Trait rat_ftable::TableDataIter
source · pub trait TableDataIter<'a> {
// Required methods
fn rows(&self) -> Option<usize>;
fn nth(&mut self, n: usize) -> bool;
fn next(&mut self) -> bool;
fn row_height(&self) -> u16;
fn row_style(&self) -> Style;
fn render_cell(&self, column: usize, area: Rect, buf: &mut Buffer);
}Expand description
Trait for accessing the table-data by the FTable.
This trait is suitable if the underlying data is an iterator. It uses internal iteration which allows much more leeway with borrowing & lifetimes.
Required Methods§
sourcefn rows(&self) -> Option<usize>
fn rows(&self) -> Option<usize>
Returns the number of rows, if known.
If they are not known, all items will be iterated to calculate things as the length of the table. Which will be slower if you have many items.
sourcefn nth(&mut self, n: usize) -> bool
fn nth(&mut self, n: usize) -> bool
Skips to the nth item, returns true if such an item exists.
sourcefn row_height(&self) -> u16
fn row_height(&self) -> u16
Row height for the current item.
sourcefn render_cell(&self, column: usize, area: Rect, buf: &mut Buffer)
fn render_cell(&self, column: usize, area: Rect, buf: &mut Buffer)
Render the cell for the current line.