pub trait TermLike:
Debug
+ Send
+ Sync {
// Required methods
fn width(&self) -> u16;
fn move_cursor_up(&self, n: usize) -> Result<(), Error>;
fn move_cursor_down(&self, n: usize) -> Result<(), Error>;
fn move_cursor_right(&self, n: usize) -> Result<(), Error>;
fn move_cursor_left(&self, n: usize) -> Result<(), Error>;
fn write_line(&self, s: &str) -> Result<(), Error>;
fn write_str(&self, s: &str) -> Result<(), Error>;
fn clear_line(&self) -> Result<(), Error>;
fn flush(&self) -> Result<(), Error>;
// Provided method
fn height(&self) -> u16 { ... }
}Expand description
A trait for minimal terminal-like behavior.
Anything that implements this trait can be used a draw target via ProgressDrawTarget::term_like.
Required Methods§
Sourcefn clear_line(&self) -> Result<(), Error>
fn clear_line(&self) -> Result<(), Error>
Clear the current line and reset the cursor to beginning of the line