Skip to main content

Module readouts

Module readouts 

Source
Expand description

Readout engine — see docs/SRD/63_status_readouts.md.

The engine provides:

  • The Readout trait + Lod / ContentMode enums.
  • The minimum ReadoutContext surface needed by the phase_outcome built-in. Methods that future built-ins will need are added in later pushes as needed.
  • One built-in: builtins::phase_outcome at Lod::Labeled / ContentMode::Value. Other LODs and the explanation-overlay mode render zero bytes until later pushes fill them in.
  • A small static registry to look up readouts by name.

Lives as a module under nmbrs-runtime rather than its own crate: the trait surface and built-ins read from data sources owned here (ActivityMetrics, the scene tree, the live-status pipeline), and nmbrs-tui already depends on nmbrs-runtime so a separate crate would either re-export those types upward or cyclic-depend. The clean split was a fiction; the module organisation gives the same conceptual boundary without the build-graph cost.

Re-exports§

pub use binder::BakedBody;
pub use binder::BinderKey;
pub use binder::DefaultBinder;
pub use binder::LayoutHint;
pub use binder::LayoutMode;
pub use binder::ReadoutBinder;
pub use binder::ReadoutHandle;
pub use binder::ReadoutSink;
pub use binder::RenderStep;
pub use binder::StringSink;
pub use binder::TuiReadoutBinder;
pub use binder::build_binder_from_workload;
pub use binder::build_event_binder;
pub use binder::build_event_binder_with_cli;
pub use binder::validate_body_for_event;
pub use buf::ReadoutBuf;
pub use context::LifecycleState;
pub use context::ReadoutContext;
pub use readout::ContentMode;
pub use readout::Lod;
pub use readout::OptionTypeMismatch;
pub use readout::OptionValue;
pub use readout::Readout;
pub use readout::ReadoutOptions;
pub use registry::Registry;

Modules§

binder
ReadoutBinder — runtime adapter between the static workload binding and the live display surface. See SRD-63 §7.
buf
ReadoutBuf — the surface-supplied output buffer.
builtins
Built-in readout implementations.
color
Colour and style resolution for readout body grammar (SRD-63 §5.2).
context
ReadoutContext — the data facade every readout draws from. See SRD-63 §2.
format
Small presentation helpers shared across readouts.
parse
Body-grammar parser for the workload readouts: block. See SRD-63 §5.1.
readout
The Readout trait + the orthogonal Lod and ContentMode axes the engine renders against.
registry
Static registry of built-in readouts.
snapshot
Snapshot capture for readout renders. See SRD-63 §6.