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,