Skip to main content

write_output

Function write_output 

Source
pub fn write_output<T: Serialize + JsonlSerialize>(
    data: &T,
    format: &OutputFormat,
    out: &mut dyn Write,
) -> Result<bool>
Expand description

Writes data to out in the requested format.

Returns Ok(true) when data was written (json/yaml/yamls/jsonl), Ok(false) when format is Table (the caller is expected to render its own table).