Trait PeekableRecords

Source
pub trait PeekableRecords {
    // Required method
    fn get_text(&self, pos: Position) -> &str;

    // Provided methods
    fn get_line(&self, pos: Position, line: usize) -> &str { ... }
    fn count_lines(&self, pos: Position) -> usize { ... }
    fn get_width(&self, pos: Position) -> usize { ... }
    fn get_line_width(&self, pos: Position, line: usize) -> usize { ... }
}
Expand description

The representation of data, rows and columns of a grid.

Required Methods§

Source

fn get_text(&self, pos: Position) -> &str

Returns a text of a cell by an index.

Provided Methods§

Source

fn get_line(&self, pos: Position, line: usize) -> &str

Returns a line of a text of a cell by an index.

Source

fn count_lines(&self, pos: Position) -> usize

Returns an amount of lines of a text of a cell by an index.

Source

fn get_width(&self, pos: Position) -> usize

Returns a width of a text of a cell by an index.

Source

fn get_line_width(&self, pos: Position, line: usize) -> usize

Returns a width of line of a text of a cell by an index.

Implementations on Foreign Types§

Source§

impl<R> PeekableRecords for &R
where R: PeekableRecords,

Source§

fn get_text(&self, pos: Position) -> &str

Source§

fn get_line(&self, pos: Position, line: usize) -> &str

Source§

fn count_lines(&self, pos: Position) -> usize

Source§

fn get_width(&self, pos: Position) -> usize

Source§

fn get_line_width(&self, pos: Position, line: usize) -> usize

Implementors§

Source§

impl<T> PeekableRecords for VecRecords<T>
where T: Cell,