Skip to main content

output

Function output 

Source
pub fn output<R>(mode: OutputMode, rows: &[R]) -> Result<(), RenderError>
where R: Tabled + Serialize,
Expand description

Render rows per mode and write to stdout. Wraps rtb_tui::render_table for OutputMode::Text and rtb_tui::render_json for OutputMode::Json.

§Errors

Surfaces rtb_tui::RenderError in JSON mode — typical cause is a Serialize impl returning Err. Text mode is infallible.