Struct tanmatsu::Terminal[][src]

pub struct Terminal {
    pub stdout: Stdout,
    pub size: Size,
    pub flush_count: usize,
    // some fields omitted
}

Fields

stdout: Stdoutsize: Sizeflush_count: usize

Implementations

impl Terminal[src]

pub fn enter_alternate_dimension(&mut self)[src]

pub fn exit_alternate_dimension(&mut self)[src]

pub fn set_title(&mut self, title: &str)[src]

pub fn enable_raw_mode(&self)[src]

pub fn disable_raw_mode(&self)[src]

pub fn enable_mouse_capture(&mut self)[src]

pub fn disable_mouse_capture(&mut self)[src]

pub fn show_cursor(&mut self)[src]

pub fn hide_cursor(&mut self)[src]

pub fn read_event(&mut self) -> Option<Event>[src]

Reads an event. It also sets the new size if the terminal has been resized, hence a mutable borrow of self is required.

pub fn poll_event(&mut self, timeout: Duration) -> Option<Event>[src]

pub fn set_cursor(&mut self, point: Point)[src]

pub fn move_cursor_left(&mut self, cells: u16)[src]

pub fn move_cursor_right(&mut self, cells: u16)[src]

pub fn move_cursor_up(&mut self, cells: u16)[src]

pub fn move_cursor_down(&mut self, cells: u16)[src]

pub fn save_cursor_point(&mut self)[src]

pub fn restore_cursor_point(&mut self)[src]

pub fn save_cursor_x(&mut self)[src]

pub fn restore_cursor_y(&mut self)[src]

pub fn set_foreground_color(&mut self, color: Color)[src]

pub fn set_background_color(&mut self, color: Color)[src]

pub fn enable_italic(&mut self)[src]

pub fn disable_italic(&mut self)[src]

pub fn reset_colors(&mut self)[src]

pub fn clear(&mut self)[src]

pub fn clear_from_cursor_to_end(&mut self)[src]

pub fn size() -> Size[src]

impl Terminal[src]

A terminal with an io::Stdout inside.

Optimally every program should have a single instance.

pub fn new() -> Result<Self, NotTTY>[src]

pub fn write(&mut self, string: &str)[src]

pub fn write_bytes(&mut self, bytes: &[u8])[src]

pub fn flush(&mut self)[src]

pub fn get_centered_border_point(&self, size: &Size) -> Point[src]

pub fn get_center(&self) -> Point[src]

pub fn initialize(&mut self)[src]

Makes the terminal ready for drawing and input and registers a panic hook that makes sure [deinitialize] is called before the panic output.

pub fn deinitialize(&mut self)[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.