pub struct StringSink { /* private fields */ }Expand description
Plain-text line buffer. Concatenates everything into a
single String; layout hints Block / InlineCompact
resolve to “insert a \n before/after Block, share
surrounding spaces for Inline.” This is what the
terminal-mode \r\x1b[K… rewriter consumes.
The sink does not own the eventual stderr write — the
caller pulls bytes out via StringSink::take and
emits them.
Implementations§
Trait Implementations§
Source§impl Default for StringSink
impl Default for StringSink
Source§impl ReadoutSink for StringSink
impl ReadoutSink for StringSink
Source§fn literal(&mut self, s: &str)
fn literal(&mut self, s: &str)
Emit a literal run of text. Lives between readout
renders; honours no layout rule on its own — the
surrounding renders do.
Source§fn render(
&mut self,
readout: ReadoutHandle,
ctx: &dyn ReadoutContext,
lod: Lod,
mode: ContentMode,
options: &ReadoutOptions,
layout: LayoutHint,
)
fn render( &mut self, readout: ReadoutHandle, ctx: &dyn ReadoutContext, lod: Lod, mode: ContentMode, options: &ReadoutOptions, layout: LayoutHint, )
Render
readout against ctx. The sink applies
layout per its surface conventions before / after
invoking readout.render().Source§fn line_break(&mut self)
fn line_break(&mut self)
Force a line break independent of layout.
Auto Trait Implementations§
impl Forget for StringSink
impl Freeze for StringSink
impl Move for StringSink
impl RefUnwindSafe for StringSink
impl Send for StringSinkwhere
RawVecInner: Send,
impl Sync for StringSinkwhere
RawVecInner: Sync,
impl Unpin for StringSink
impl UnsafeUnpin for StringSink
impl UnwindSafe for StringSinkwhere
RawVecInner: UnwindSafe,
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> 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