pub struct CaptureChannel { /* private fields */ }Expand description
Test-capture impl: records every op-output line for assertions and
writes no fd. The SRD-87 §12 surface-agreement / no-bypass tests
install one of these and inspect Self::op_lines.
Implementations§
Source§impl CaptureChannel
impl CaptureChannel
pub fn new() -> Self
Sourcepub fn op_lines(&self) -> Vec<String>
pub fn op_lines(&self) -> Vec<String>
Every op-output line submitted so far, in submission order.
Sourcepub fn log_lines(&self) -> Vec<(LogLevel, String)>
pub fn log_lines(&self) -> Vec<(LogLevel, String)>
Every log-bucket line submitted so far, in submission order.
Sourcepub fn raster_frames(&self) -> Vec<String>
pub fn raster_frames(&self) -> Vec<String>
Every raster-bucket frame submitted so far, in submission order.
Trait Implementations§
Source§impl Clone for CaptureChannel
impl Clone for CaptureChannel
Source§impl Default for CaptureChannel
impl Default for CaptureChannel
Source§impl OutputChannel for CaptureChannel
impl OutputChannel for CaptureChannel
Source§fn op_output(&self, line: &str)
fn op_output(&self, line: &str)
op-output bucket: one adapter-rendered op line. Reaches the
terminal/file the channel owns — never around it.
Source§fn log(&self, level: LogLevel, message: &str)
fn log(&self, level: LogLevel, message: &str)
log bucket: project one diagnostic line to the live terminal
(SRD-87 §5). This is the output half only — the durable
session.log write and the fold-ring append are L1 intake, done by
observer::log_categorized before this is ever called, and the
sink_active/min_level gate (whether a line reaches the live
surface at all) stays with the observer. The default writes the
colorized line to stderr — the fd the channel owns. A sink-active
interactive run never reaches here (the sink renders from the ring);
a console-owning run never reaches here (suppressed upstream); piped
and bootstrap runs land here.Source§fn raster(&self, frame: &str)
fn raster(&self, frame: &str)
raster bucket: a fully-rendered, self-contained terminal frame
(braille / ANSI cells) — e.g. the plotter’s canvas (SRD-87 §5). The
producer owns layout (cursor controls, line endings); the channel
owns the fd. The default writes the frame bytes raw to the stdout the
channel owns — correct for a console-owning adapter (the plotter owns
the screen) and for a piped plot redirected to a file.
Auto Trait Implementations§
impl Freeze for CaptureChannel
impl RefUnwindSafe for CaptureChannel
impl Send for CaptureChannel
impl Sync for CaptureChannel
impl Unpin for CaptureChannel
impl UnsafeUnpin for CaptureChannel
impl UnwindSafe for CaptureChannel
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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