Skip to main content

Module printer

Module printer 

Source
Available on crate feature terminal only.
Expand description

Command output rendering to stdout.

The Printer trait abstracts how a command emits what it prints: events while it runs, then its result. The StdoutPrinter implementation writes plain text or JSON to stdout, and PrintTable renders a value as a table.

Every value a command prints is data: a named type whose Display writes the text form and whose Serialize writes the JSON one. There is no message wrapper, a sentence being the text form of data, never data itself.

Structs§

StdoutPrinter
A Printer writing plain text or JSON to stdout.

Traits§

PrintTable
A value that can render itself as a table.
Printer
Sink a command writes its output to.