pub trait Backend {
// 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>;
// Provided methods
fn append_lines(&mut self, n: u16) -> Result<()> { ... }
fn clear_region(&mut self, clear_type: ClearType) -> 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 size(&self) -> Result<Rect, Error>
fn flush(&mut self) -> Result<(), Error>
Provided Methods§
sourcefn append_lines(&mut self, n: u16) -> Result<()>
fn append_lines(&mut self, n: u16) -> Result<()>
Insert n
line breaks to the terminal screen