[−][src]Module dsa::output
Output formatting.
Usually chosen via a command line parameter, the available output formats aim for human or machine readability. Every possible output value does have its own enum kind, usually returned by an Actions call method.
Examples
let formatter: Box<dyn Formatter> = Format::HumanReadable.into(); let output = formatter.format(&Output::Gauge {name: "health".to_string(), current: 1, max: 10}); assert_eq!("current health: 1/10 (10%)",output);
Enums
Format | Enum of possible formats, can be converted to a Formatter. |
Output | Types of output generated by an Action. |
Traits
Formatter | Converts an Output to a String based on its own rules. |