Skip to main content

Module buf

Module buf 

Source
Expand description

ReadoutBuf — the surface-supplied output buffer.

Push 1 only needs the String-backed buffer that the terminal-mode log path uses (ANSI escape sequences land inline as text). Later pushes will add a Vec<Span>-backed buffer for the TUI surface; the ReadoutBuf trait is the single write surface a Readout impl sees regardless of which backing store is in use.

Structs§

StringBuf
String-backed buffer. Used by the terminal-mode log surface, which routes through nmbrs-runtime::observer::log and ultimately eprint!. ANSI escape sequences pass through unchanged; the surface above strips them when the destination is a non-TTY pipe.

Traits§

ReadoutBuf
Append-only write surface a readout writes its rendered piece into. Implementations decide how to handle styling (ANSI inline vs. typed style runs) and ANSI stripping (TTY vs. non-TTY sinks).

Functions§

render_to_string
Convenience: render a readout into a freshly allocated String. Used by the in-process tests and the crate::diag! bridge in Push 1; later pushes will route directly through a borrowed buffer instead.