1/// Cell implementation which can be used with [`VecRecords`].
2///
3/// [`VecRecords`]: crate::records::vec_records::VecRecords
4pub trait Cell {
5 /// Gets a text.
6 fn text(&self) -> &str;
7
8 /// Gets a line by index.
9 fn line(&self, line: usize) -> &str;
10
11 /// Returns a number of lines cell has.
12 fn count_lines(&self) -> usize;
13
14 /// Returns a width of cell.
15 fn width(&self) -> usize;
16
17 /// Returns a width of cell line.
18 fn line_width(&self, line: usize) -> usize;
19}
20