pub trait TextBuffer {
// Required methods
fn width(&self) -> usize;
fn height(&self) -> usize;
fn read(&self, row: usize, col: usize) -> Cell;
fn write(&mut self, row: usize, col: usize, cell: Cell);
// Provided methods
fn delete(&mut self, row: usize, col: usize) { ... }
fn new_line(&mut self, cell: Cell) { ... }
fn clear(&mut self, cell: Cell) { ... }
}
Expand description
A 2D array of Cell
to render on screen