Skip to main content

format_output

Function format_output 

Source
pub fn format_output<T: Formattable + Serialize>(
    items: &[T],
    format: OutputFormat,
) -> Result<String>
Expand description

Format a list of items in the specified output format.

ยงErrors

Returns an error if JSON serialization or CSV writing fails.