1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/// Cell implementation which can be used with [`VecRecords`].
///
/// [`VecRecords`]: crate::records::vec_records::VecRecords
pub trait Cell {
    /// Gets a text.
    fn text(&self) -> &str;

    /// Gets a line by index.
    fn line(&self, line: usize) -> &str;

    /// Returns a number of lines cell has.
    fn count_lines(&self) -> usize;

    /// Returns a width of cell.
    fn width(&self) -> usize;

    /// Returns a width of cell line.
    fn line_width(&self, line: usize) -> usize;
}