pub struct LinePrinter { /* private fields */ }Expand description
Prints lines of text, possibly overprinting previously printed lines if the terminal supports it.
Implementations§
Source§impl LinePrinter
impl LinePrinter
pub fn new() -> Self
pub fn is_smart_terminal(&self) -> bool
pub fn set_smart_terminal(&mut self, smart: bool)
Sourcepub fn print(&self, to_print: &[u8], line_type: LinePrinterLineType)
pub fn print(&self, to_print: &[u8], line_type: LinePrinterLineType)
Overprints the current line. If type is ELIDE, elides to_print to fit on one line.
Sourcepub fn print_on_new_line(&self, to_print: &[u8])
pub fn print_on_new_line(&self, to_print: &[u8])
Prints a string on a new line, not overprinting previous output.
Sourcepub fn set_console_locked(&mut self, locked: bool)
pub fn set_console_locked(&mut self, locked: bool)
Lock or unlock the console. Any output sent to the LinePrinter while the console is locked will not be printed until it is unlocked.
Auto Trait Implementations§
impl !Freeze for LinePrinter
impl !RefUnwindSafe for LinePrinter
impl Send for LinePrinter
impl !Sync for LinePrinter
impl Unpin for LinePrinter
impl UnwindSafe for LinePrinter
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