Trait rat_ftable::TableData
source · pub trait TableData<'a> {
// Required methods
fn rows(&self) -> usize;
fn render_cell(
&self,
column: usize,
row: usize,
area: Rect,
buf: &mut Buffer
);
// Provided methods
fn header(&self) -> Option<Row<'a>> { ... }
fn footer(&self) -> Option<Row<'a>> { ... }
fn row_height(&self, row: usize) -> u16 { ... }
fn row_style(&self, row: usize) -> Option<Style> { ... }
fn widths(&self) -> Vec<Constraint> { ... }
}Expand description
Trait for accessing the table-data by the FTable.
This trait is suitable if the underlying data is random access.
Required Methods§
Provided Methods§
sourcefn header(&self) -> Option<Row<'a>>
fn header(&self) -> Option<Row<'a>>
Header can be obtained from here. Alternative to setting on FTable.
Footer can be obtained from here. Alternative to setting on FTable.
sourcefn row_height(&self, row: usize) -> u16
fn row_height(&self, row: usize) -> u16
Row height.
sourcefn widths(&self) -> Vec<Constraint>
fn widths(&self) -> Vec<Constraint>
Column constraints.