Trait rustty::CellAccessor [] [src]

pub trait CellAccessor: HasSize {
    fn cellvec(&self) -> &Vec<Cell>;
    fn cellvec_mut(&mut self) -> &mut Vec<Cell>;

    fn clear(&mut self, blank: Cell) { ... }
    fn pos_to_index(&self, x: usize, y: usize) -> Option<usize> { ... }
    fn get(&self, x: usize, y: usize) -> Option<&Cell> { ... }
    fn get_mut(&mut self, x: usize, y: usize) -> Option<&mut Cell> { ... }
}

Required Methods

Provided Methods

Clears self, using the given Cell as a blank.

Returns a reference to the Cell at the given coordinates, or None if the index is out of bounds.

Examples

use rustty::{Terminal, CellAccessor};

let mut term = Terminal::new().unwrap();

let a_cell = term.get(5, 5);

Returns a mutable reference to the Cell at the given coordinates, or None if the index is out of bounds.

Examples

use rustty::{Terminal, CellAccessor};

let mut term = Terminal::new().unwrap();

let a_mut_cell = term.get_mut(5, 5);

Implementors