Trait papergrid::records::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§
Provided Methods§
sourcefn get_line(&self, pos: Position, line: usize) -> &str
fn get_line(&self, pos: Position, line: usize) -> &str
Returns a line of a text of a cell by an index.
sourcefn count_lines(&self, pos: Position) -> usize
fn count_lines(&self, pos: Position) -> usize
Returns an amount of lines of a text of a cell by an index.
sourcefn get_line_width(&self, pos: Position, line: usize) -> usize
fn get_line_width(&self, pos: Position, line: usize) -> usize
Returns a width of line of a text of a cell by an index.