Trait TermLike
trait TermLike: Debug + Send + Sync
A trait for minimal terminal-like behavior.
Anything that implements this trait can be used a draw target via ProgressDrawTarget::term_like.
Required Methods
fn width(self: &Self) -> u16Return the terminal width
fn move_cursor_up(self: &Self, n: usize) -> Result<()>Move the cursor up by
nlinesfn move_cursor_down(self: &Self, n: usize) -> Result<()>Move the cursor down by
nlinesfn move_cursor_right(self: &Self, n: usize) -> Result<()>Move the cursor right by
ncharsfn move_cursor_left(self: &Self, n: usize) -> Result<()>Move the cursor left by
ncharsfn write_line(self: &Self, s: &str) -> Result<()>Write a string and add a newline.
fn write_str(self: &Self, s: &str) -> Result<()>Write a string
fn clear_line(self: &Self) -> Result<()>Clear the current line and reset the cursor to beginning of the line
fn flush(self: &Self) -> Result<()>
Provided Methods
fn height(self: &Self) -> u16Return the terminal height
Implementors
impl TermLike for Term