pub struct AreaPrinter {
pub buffer: String,
/* private fields */
}Expand description
A port of pterm.AreaPrinter: an in-place, self-redrawing block of
terminal lines (not a full alternate-screen TUI – pterm itself is a
terminal-formatting library, not a TUI framework, so cursor-up-and-
overwrite via raw ANSI escapes is the faithful equivalent, matching
what pterm.AreaPrinter does internally).
buffer holds the plain-text content flush_lines_to_area builds
(kept styling-free so truncation-width assertions stay exact); colors
are applied separately in AreaPrinter::redraw, after width
truncation, so SGR escape bytes never skew a line’s displayed width.
Fields§
§buffer: StringImplementations§
Source§impl AreaPrinter
impl AreaPrinter
Trait Implementations§
Source§impl Default for AreaPrinter
impl Default for AreaPrinter
Source§fn default() -> AreaPrinter
fn default() -> AreaPrinter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AreaPrinter
impl RefUnwindSafe for AreaPrinter
impl Send for AreaPrinter
impl Sync for AreaPrinter
impl Unpin for AreaPrinter
impl UnsafeUnpin for AreaPrinter
impl UnwindSafe for AreaPrinter
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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