pub struct BakedBody { /* private fields */ }Expand description
A baked readout body — the artifact the body-grammar parser produces at workload-load time. Cheap to clone (steps are owned, but small) and shared across event fires.
Construction goes through new /
from_single /
from_steps — the steps field is
pub(crate) so the parser can build directly while
preserving room for future invariants (e.g. “first step
must be a Render”).
Implementations§
Source§impl BakedBody
impl BakedBody
pub fn new() -> Self
Sourcepub fn from_steps(steps: Vec<RenderStep>) -> Self
pub fn from_steps(steps: Vec<RenderStep>) -> Self
Build from a pre-validated step list. Used by the body-grammar parser; tests and integration paths that don’t go through the parser construct via this constructor too.
Sourcepub fn steps(&self) -> &[RenderStep]
pub fn steps(&self) -> &[RenderStep]
Borrow the step list (read-only). Surfaces that need to inspect the baked steps (the TUI binder, snapshot capture) take this view rather than reaching through the field.
Sourcepub fn from_single(readout: ReadoutHandle, lod: Lod) -> Self
pub fn from_single(readout: ReadoutHandle, lod: Lod) -> Self
Build from a single registered readout name. Used by
the workload parser’s Form-B path (on_phase_end: phase_outcome) where no body grammar is involved.
Sourcepub fn fire(
&self,
ctx: &dyn ReadoutContext,
mode: ContentMode,
sink: &mut dyn ReadoutSink,
)
pub fn fire( &self, ctx: &dyn ReadoutContext, mode: ContentMode, sink: &mut dyn ReadoutSink, )
Walk the step list, calling readouts and writing
literals. The sink mediates layout — the body just
emits steps in order. Inline colour directives
(@RED / [#hex]) wrap the next step in ANSI
on / off bytes; consecutive directives accumulate
(last one wins for the next step).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BakedBody
impl !UnwindSafe for BakedBody
impl Freeze for BakedBody
impl Send for BakedBody
impl Sync for BakedBody
impl Unpin for BakedBody
impl UnsafeUnpin for BakedBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more