pub struct FrameResult {
pub bytes: Buffer,
pub output_height: u32,
pub plain_output: String,
pub static_output: String,
pub render_time_ms: f64,
pub changed_lines: u32,
}Expand description
The result of one render_frame. bytes is the exact transport payload the
JS Ink class (the sole stream writer, M3-K1) writes verbatim; the rest are
queryable side outputs.
Fields§
§bytes: BufferThe diffed transport bytes from FrameWriter::write_frame. Empty only when
the mode produced an empty write (handled as None by render_frame).
output_height: u32The rendered frame height in rows (render_styled’s height output).
plain_output: StringThe plain styled frame string (render_styled’s string output), before
any transport framing. Mode-independent.
static_output: StringThe <Static> subtree’s output for this frame — the text printed once
above the live region (ink’s renderer.ts static branch, via
render_static). "" when the tree has no static node (the common case);
otherwise the static body plus a trailing newline.
render_time_ms: f64Wall-clock milliseconds spent in the core render + transport write. NONDETERMINISTIC — excluded from every byte/equality assertion.
changed_lines: u32How many visible lines this frame actually rewrote
(FrameWriter::last_changed_lines). Pure ADDITIVE telemetry that rides
alongside bytes and does not alter a single transport byte: 0 for a
no-op timer-fire frame, the visible line count for a full repaint, the
differ’s changed-line count for an incremental diff. Lets downstream
pacing (P5.3) tell a real-change frame from a no-op fire. Note a fully
no-op frame is returned as None by render_frame, so a delivered
FrameResult normally carries changed_lines >= 1.