pub enum OutputFormat {
Text,
Json,
Jsonl,
Ndjson,
Yaml,
Csv,
Tsv,
}Expand description
Output format for machine/human consumption.
Variants§
Text
Default: colored, human-readable
Json
Machine-readable JSON, no color
Jsonl
JSON Lines (useful for streaming)
Ndjson
Newline-delimited JSON; alias of jsonl. Same wire shape, different name.
Yaml
YAML document (best-effort serialization of the JSON shape).
Csv
Comma-separated values (best-effort flattening of the top-level shape).
Tsv
Tab-separated values (best-effort flattening of the top-level shape).
Implementations§
Source§impl OutputFormat
impl OutputFormat
Sourcepub fn is_structured(&self) -> bool
pub fn is_structured(&self) -> bool
Returns true for every machine-readable format. Equivalent to
*self != OutputFormat::Text. Used by stderr-emitter methods
(info, status, warning, verbose, progress) to suppress
human-targeted chatter under any structured mode.
Trait Implementations§
Source§impl Clone for OutputFormat
impl Clone for OutputFormat
Source§fn clone(&self) -> OutputFormat
fn clone(&self) -> OutputFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OutputFormat
impl Debug for OutputFormat
impl Eq for OutputFormat
Source§impl PartialEq for OutputFormat
impl PartialEq for OutputFormat
Source§fn eq(&self, other: &OutputFormat) -> bool
fn eq(&self, other: &OutputFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OutputFormat
Source§impl ValueEnum for OutputFormat
impl ValueEnum for OutputFormat
Auto Trait Implementations§
impl Freeze for OutputFormat
impl RefUnwindSafe for OutputFormat
impl Send for OutputFormat
impl Sync for OutputFormat
impl Unpin for OutputFormat
impl UnsafeUnpin for OutputFormat
impl UnwindSafe for OutputFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.