Skip to main content

Terminal

Trait Terminal 

Source
pub trait Terminal {
    // Required methods
    fn size(&self) -> (usize, usize);
    fn read_key(&mut self) -> Result<Option<Key>>;
    fn draw(&mut self, frame: &Frame) -> Result<()>;
    fn color(&self) -> bool;
}
Expand description

The terminal in raw mode. When dropped, it gives the terminal back as it was.

Required Methods§

Source

fn size(&self) -> (usize, usize)

Columns and lines.

Source

fn read_key(&mut self) -> Result<Option<Key>>

The next key; None when the input ended.

Source

fn draw(&mut self, frame: &Frame) -> Result<()>

Source

fn color(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§