pub trait TermLike: Debug + Send + Sync {
    fn width(&self) -> u16;
    fn move_cursor_up(&self, n: usize) -> Result<()>;
    fn move_cursor_down(&self, n: usize) -> Result<()>;
    fn move_cursor_right(&self, n: usize) -> Result<()>;
    fn move_cursor_left(&self, n: usize) -> Result<()>;
    fn write_line(&self, s: &str) -> Result<()>;
    fn write_str(&self, s: &str) -> Result<()>;
    fn clear_line(&self) -> Result<()>;
    fn flush(&self) -> Result<()>;
}
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

Return the terminal width

Move the cursor up by n lines

Move the cursor down by n lines

Move the cursor right by n lines

Move the cursor left by n lines

Write a string and add a newline.

Write a string

Clear the current line and reset the cursor to beginning of the line

Implementations on Foreign Types

Implementors