pub struct Body { /* private fields */ }Expand description
A struct to call overwrite on, to avoid flicker in terminal.
Implementations§
Source§impl Body
impl Body
Sourcepub fn overwrite<T, Writer>(
&mut self,
new_text: &T,
write: Writer,
available_width: usize,
) -> Result<()>
pub fn overwrite<T, Writer>( &mut self, new_text: &T, write: Writer, available_width: usize, ) -> Result<()>
overwrite:
write new_text to write
and erase the previous text you overwrote with AnsiSeq codes,
making educated guesses about the height to clear
from available_width variable and self.buffer previous text line lengths.
The goal of Body and overwrite is to provide easy text writing to terminal without flicker.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Body
impl RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl UnsafeUnpin for Body
impl UnwindSafe for Body
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