pub enum OutputMode {
Text,
Json,
}Expand description
Output format and destination strategy
OutputMode controls where messages and results are written and how
results are formatted. It is orthogonal to Verbosity, which controls
whether output is produced at all.
In text mode, all output goes to stdout. In JSON mode, messages go to stderr (keeping stdout reserved for machine-readable data) and results are serialized as JSON to stdout.
§Examples
use clawless_cli::output::OutputMode;
let mode = OutputMode::default();
assert_eq!(mode, OutputMode::Text);Variants§
Text
Human-readable text output; all output goes to stdout
Json
Machine-readable JSON output; messages go to stderr, results go to stdout as JSON
Trait Implementations§
Source§impl Clone for OutputMode
impl Clone for OutputMode
impl Copy for OutputMode
Source§impl Debug for OutputMode
impl Debug for OutputMode
Source§impl Default for OutputMode
impl Default for OutputMode
impl Eq for OutputMode
Source§impl Hash for OutputMode
impl Hash for OutputMode
Source§impl Ord for OutputMode
impl Ord for OutputMode
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for OutputMode
impl PartialEq for OutputMode
Source§impl PartialOrd for OutputMode
impl PartialOrd for OutputMode
impl StructuralPartialEq for OutputMode
Auto Trait Implementations§
impl Freeze for OutputMode
impl RefUnwindSafe for OutputMode
impl Send for OutputMode
impl Sync for OutputMode
impl Unpin for OutputMode
impl UnsafeUnpin for OutputMode
impl UnwindSafe for OutputMode
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