Struct indicatif::Term
[−]
[src]
pub struct Term { /* fields omitted */ }
Abstraction around a terminal.
Methods
impl Term
[src]
fn stdout() -> Term
[src]
Return a new unbuffered terminal
fn stderr() -> Term
[src]
Return a new unbuffered terminal to stderr
fn buffered_stdout() -> Term
[src]
Return a new buffered terminal
fn buffered_stderr() -> Term
[src]
Return a new buffered terminal to stderr
fn write_line(&self, s: &str) -> Result<()>
[src]
Writes a string to the terminal and adds a newline.
fn flush(&self) -> Result<()>
[src]
Flushes
fn is_term(&self) -> bool
[src]
Checks if the terminal is indeed a terminal.
fn size(&self) -> (u16, u16)
[src]
Returns the terminal size or gets sensible defaults.
fn size_checked(&self) -> Option<(u16, u16)>
[src]
Returns the terminal size in rows and columns.
If the size cannot be reliably determined None is returned.
fn move_cursor_up(&self, n: usize) -> Result<()>
[src]
Moves the cursor up n
lines
fn move_cursor_down(&self, n: usize) -> Result<()>
[src]
Moves the cursor down n
lines
fn clear_line(&self) -> Result<()>
[src]
Clears the current line.
fn clear_last_lines(&self, n: usize) -> Result<()>
[src]
Clear the last n
lines.