Expand description
Structured display blocks used as the boundary between formatting and terminal rendering.
This module exists so higher-level code can describe what should be shown without deciding how it should be painted in a terminal. Formatters build documents out of semantic blocks, and the renderer later turns those blocks into themed terminal text.
In practice, this keeps rendering bugs easier to localize:
- if the document shape is wrong, the formatter is wrong
- if the document is right but the terminal output is wrong, the renderer is wrong
Contract:
- document types may carry semantic styling hints and layout intent
- they should not depend on terminal width probing, theme resolution, or config precedence
- block variants are intentionally higher-level than raw ANSI/text spans so multiple renderers can share the same model
Structs§
- Code
Block - Fenced code block with optional language metadata.
- Document
- Renderable document composed of high-level display blocks.
- Json
Block - JSON payload block.
- Line
Block - Single rendered line composed of independently styled parts.
- Line
Part - Fragment of a rendered line with optional semantic styling.
- Mreg
Block - MREG-style hierarchical key/value block.
- Mreg
Entry - Key/value entry inside an MREG row.
- MregRow
- One row inside an MREG-style block.
- Panel
Block - Framed panel containing a nested document.
- Table
Block - Tabular document block.
- Value
Block - Block representing a simple ordered list of scalar values.
Enums§
- Block
- Top-level document block variants understood by the renderer.
- Mreg
Value - Rendered value kinds supported by MREG output.
- Panel
Rules - Rule placement policy for panel chrome.
- Table
Align - Column alignment hint for table rendering.
- Table
Style - Table presentation style.
- Value
Layout - Layout policy for scalar value blocks.