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