Expand description
The output representation: pretty for people, or json for machines.
OutputFormat parses from those two lowercase names, and Display
prints them back. With the cli feature it is a Clap value enum, so
OutputArgs parses --format into it.
use ctl_core::format::OutputFormat;
assert_eq!("json".parse::<OutputFormat>(), Ok(OutputFormat::Json));
assert!(OutputFormat::Json.is_json());
assert_eq!(OutputFormat::default(), OutputFormat::Pretty);Structs§
- Parse
Format Error - The error
OutputFormat’sFromStrreturns for text that is notprettyorjson.Displayprintsexpected pretty or json.
Enums§
- Output
Format - The output representation a view writes a result in.