Skip to main content

Module render

Module render 

Source
Expand description

Renderer layer (3b of ADR-0008) — output formatting.

The Renderer trait has explicit per-noun methods (prose is irreducibly per-noun); each format impl is a separate struct (prose, json, lines, csv, tsv). MetaContext threads the auth-state disclosure from ADR-0007 through every call.

Format is the user-facing enum that maps --format flag values to concrete renderer instances via Format::into_renderer. It derives clap::ValueEnum so the CLI can parse it directly.

Re-exports§

pub use auth::AuthLoginOutcome;
pub use auth::AuthLogoutOutcome;
pub use auth::AuthSetTokenOutcome;
pub use auth::AuthStatusOutcome;
pub use dump::DumpDeleteOutcome;
pub use dump::DumpEvent;
pub use dump::DumpOutcome;
pub use format::Format;
pub use progress::HumanProgress;
pub use progress::JsonProgress;
pub use progress::ProgressReporter;

Modules§

auth
Auth renderer-input shapes — typed values passed to Renderer::auth_* methods.
csv
CSV renderer — comma-separated values output.
dump
Dump renderer-input shapes — typed values passed to Renderer::project_dump and ProgressReporter::report.
format
Format enum and renderer factory.
json
JSON renderer — newline-delimited JSON output.
lines
Lines renderer — one identifier per line.
progress
Progress reporter layer — stderr progress lines during a dump run.
prose
Prose renderer — rich human-readable output.
tsv
TSV renderer — tab-separated values output.

Structs§

DataModelListView
The data a renderer needs to render a data-model list result.
MetaContext
Auth and server context attached to every rendered response. See ADR-0007.
ProjectListView
The data a renderer needs to render a project list result.
ResourceListView
The data a renderer needs to render a resource list result.
ResourceTypeListView
The data a renderer needs to render a resource-type list result.
TableOptions
Per-invocation tabular options resolved from the CLI flags by FormatArgs::table_options() (step 4). Lives here so it can be construction-time validated (syntax only — unknown-name validation happens inside the engine where the per-noun column set is known).

Enums§

HeaderMode
Controls which rows are emitted by render_table.
ResourceListPagination
Pagination state for a resource list render call (D5 of the plan).

Traits§

Renderer
The Renderer trait. Methods grow as new noun-groups land.