pub fn print_page<T>(
rows: &[T],
total: i64,
window: Window,
json: bool,
to_json: impl Fn(&T) -> Value,
to_line: impl Fn(&T) -> String,
)Expand description
Prints one page, in whichever of the two shapes was asked for.
print_rows’s paged twin, and the same division of labour: the to_line
closure carries the Palette, so the json branch stays structurally
unable to reach one. order list --json is the one caller that does not go
through here — it batches an authorization lookup its to_json needs, and
folding that in would make the text path pay for a query it never reads —
so it calls json_page and print_footer directly instead.