Expand description
Shared output-format types for the CLI.
One -o/--output <format> convention is used across the whole CLI surface
(issue #1125). This module owns the machine-readable OutputFormat enum
and the rendering machinery (write_output/output_as and the
JsonlSerialize trait); command modules bind -o/--output to this enum
and delegate serialization here, rendering their own Table branch when
output_as returns Ok(false).
Atlassian-specific JsonlSerialize impls for its collection wrapper types
live in [crate::cli::atlassian::format] (they need the wrapper types); this
module carries only the trait, the blanket Vec<T> impl, and the generic
helpers.
Enums§
- Output
Format - Display format for list/table commands.
- Table
OrJson - A two-way
-o/--outputselector for commands that render either a human-readable table or machine-readable JSON (no YAML/JSONL variants).
Traits§
- Jsonl
Serialize - Writes a value as newline-terminated JSON Lines.
Functions§
- output_
as - Serializes data in the requested output format to stdout.
Returns
Ok(true)if data was printed (json/yaml/yamls/jsonl),Ok(false)if the caller should handle table output. - write_
items_ jsonl - Writes each item in an iterator as a single compact JSON line.
- write_
output - Writes
datatooutin the requested format. - write_
scalar_ jsonl - Writes a single serializable value as one compact JSON line.