Skip to main content

Module command_result

Module command_result 

Source
Expand description

Structured command output and its terminal/JSON rendering.

CommandOutput wraps the typed CliArtifact a command produces. Machine output (--output json/yaml) serializes the artifact verbatim — the same tagged union the MCP server deserializes. render_result renders the artifact for an interactive terminal, dispatching per variant. The reusable payload shapes TextOutput, SuccessOutput, KeyValueOutput, and TableOutput remain available as command-side data structs.

Structs§

CommandOutput
A command’s renderable result: a typed CliArtifact plus terminal-only presentation state (an optional section title and a render-suppression flag).
KeyValueItem
KeyValueOutput
SuccessOutput
TableOutput
TextOutput

Enums§

ChartType

Functions§

render_result