pub enum RenderMode {
Diff,
Debug,
ScreenReader,
NonInteractive,
}Expand description
The render mode selector (render_frame’s mode arg).
Each arm sets ONLY fields that already exist on FrameParams and calls
FrameWriter::write_frame unchanged — the M3-E scope rule (no new rt logic;
rt is covenant-frozen). The screen-reader / non-interactive behavioral
branches (SGR stripping, alt-screen, etc.) are M3-K2’s JS-side job; M3-E only
wires the existing knobs.
Variants§
Diff
Interactive incremental render: debug=false, is_tty=true. Advances the
live FrameWriter baseline; emits the line-diff bytes (BSU/ESU-wrapped).
Debug
Plain full-frame render (FrameParams.debug=true, frame.rs:123): no diff,
clear, or sync. Routed through a THROWAWAY writer so it consumes NO diff
state — a debug render between two live frames cannot corrupt the next
diff’s steady-gate or clear decision. renderToString is this mode.
ScreenReader
Screen-reader: a full plain frame, same no-diff-state-consumed property as
Debug (routed through the throwaway writer). The accessibility transform
of the content is M3-K2’s JS concern; here it is the debug knob.
NonInteractive
Non-interactive (is_tty=false): write_frame’s non-TTY path — no clear, no
sync wrap, output padded with a trailing newline and diffed. A real render
that advances the live baseline.
Trait Implementations§
Source§impl Clone for RenderMode
impl Clone for RenderMode
Source§fn clone(&self) -> RenderMode
fn clone(&self) -> RenderMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more