[][src]Trait tui::backend::Backend

pub trait Backend {
    fn draw<'a, I>(&mut self, content: I) -> Result<(), Error>
    where
        I: Iterator<Item = (u16, u16, &'a Cell)>
;
fn hide_cursor(&mut self) -> Result<(), Error>;
fn show_cursor(&mut self) -> Result<(), Error>;
fn get_cursor(&mut self) -> Result<(u16, u16), Error>;
fn set_cursor(&mut self, x: u16, y: u16) -> Result<(), Error>;
fn clear(&mut self) -> Result<(), Error>;
fn size(&self) -> Result<Rect, Error>;
fn flush(&mut self) -> Result<(), Error>; }

Required methods

fn draw<'a, I>(&mut self, content: I) -> Result<(), Error> where
    I: Iterator<Item = (u16, u16, &'a Cell)>, 

fn hide_cursor(&mut self) -> Result<(), Error>

fn show_cursor(&mut self) -> Result<(), Error>

fn get_cursor(&mut self) -> Result<(u16, u16), Error>

fn set_cursor(&mut self, x: u16, y: u16) -> Result<(), Error>

fn clear(&mut self) -> Result<(), Error>

fn size(&self) -> Result<Rect, Error>

fn flush(&mut self) -> Result<(), Error>

Loading content...

Implementors

impl Backend for TestBackend[src]

impl<W> Backend for TermionBackend<W> where
    W: Write
[src]

fn clear(&mut self) -> Result<()>[src]

Clears the entire screen and move the cursor to the top left of the screen

fn hide_cursor(&mut self) -> Result<()>[src]

Hides cursor

fn show_cursor(&mut self) -> Result<()>[src]

Shows cursor

fn get_cursor(&mut self) -> Result<(u16, u16)>[src]

Gets cursor position (0-based index)

fn set_cursor(&mut self, x: u16, y: u16) -> Result<()>[src]

Sets cursor position (0-based index)

fn size(&self) -> Result<Rect>[src]

Return the size of the terminal

Loading content...