pub struct OutputBuffer { /* private fields */ }Expand description
Pre-allocated buffer for building ANSI escape sequences.
All output is accumulated here, then flushed in a single write() syscall
to prevent terminal flickering.
Implementations§
Source§impl OutputBuffer
impl OutputBuffer
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a new output buffer with the given capacity.
Sourcepub fn cursor_move(&mut self, x: u16, y: u16)
pub fn cursor_move(&mut self, x: u16, y: u16)
Move cursor to (x, y) position (1-indexed for ANSI).
Sourcepub fn cursor_hide(&mut self)
pub fn cursor_hide(&mut self)
Hide cursor.
Sourcepub fn cursor_show(&mut self)
pub fn cursor_show(&mut self)
Show cursor.
Sourcepub fn reset_attrs(&mut self)
pub fn reset_attrs(&mut self)
Reset all attributes.
Sourcepub fn clear_screen(&mut self)
pub fn clear_screen(&mut self)
Clear the entire screen.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OutputBuffer
impl RefUnwindSafe for OutputBuffer
impl Send for OutputBuffer
impl Sync for OutputBuffer
impl Unpin for OutputBuffer
impl UnsafeUnpin for OutputBuffer
impl UnwindSafe for OutputBuffer
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