Skip to main content

Module output

Module output 

Source
Expand description

Output formatters for CLI results.

The CLI doubles as a test-scenario runner across persistences, so output must be both human-readable (default table, ANSI styled via [crate::table_display]) and machine-comparable. JSON variants are the ergonomic-but-lossy options; cbor-diag (RFC 8949 §8 diagnostic notation) is the lossless form used for golden test fixtures.

Modules§

cbor_diag
CBOR Diagnostic Notation writer (RFC 8949 §8).
json
Lossy JSON output — best-effort, for piping to jq and human eyes.
ndjson
Newline-delimited JSON — one record per line, easy to pipe to jq -c or read line-by-line in tests. Same lossy rules as json (see that module).

Enums§

OutputFormat
Output format selector passed into renderers.

Functions§

render_list
Render a list of records to a String in the chosen non-table format.
render_record
Render a single record to a String in the chosen non-table format.
render_scalar
Render a scalar (aggregate result) to a String.