Skip to main content

Module output

Module output 

Source
Expand description

The shared presentation layer: one table renderer, one JSON envelope.

Every report goes out through emit, so no command branches on --json itself and the two surfaces cannot drift apart. A report’s job is to build a Report; how it reaches a terminal or a harness is this module’s job.

Re-exports§

pub use envelope::iso8601_ms;
pub use envelope::Envelope;
pub use envelope::Period;
pub use table::format_count;
pub use table::format_money;
pub use table::Cell;
pub use table::Style;
pub use table::Table;
pub use table::UNSUPPORTED;

Modules§

envelope
The versioned --json envelope.
table
The flat table renderer.

Structs§

Report
One report, rendered either way.

Functions§

emit
Print a report to stdout: the envelope when json, otherwise the table.
write_report
emit against an arbitrary writer, for tests and for callers that capture output. Never emits escape codes unless style allows them.