pub trait EditorData<D>: TableData<'static> {
// Required method
fn set_data(&mut self, data: Rc<RefCell<Vec<D>>>);
}Expand description
Extends TableData with the capability to set the actual data at a later point in time.
This is needed to inject the data during rendering, while leaving the rendering to the caller.
Due to life-time issues the data is given as Rc<>.
Required Methods§
Trait Implementations§
Source§impl<'a, D> TableData<'a> for Box<dyn EditorData<D> + 'a>
impl<'a, D> TableData<'a> for Box<dyn EditorData<D> + 'a>
Source§fn header(&self) -> Option<Row<'a>>
fn header(&self) -> Option<Row<'a>>
Header can be obtained from here.
Alternative to setting on Table.
Footer can be obtained from here.
Alternative to setting on Table.
Source§fn row_height(&self, row: usize) -> u16
fn row_height(&self, row: usize) -> u16
Row height.
Source§fn widths(&self) -> Vec<Constraint>
fn widths(&self) -> Vec<Constraint>
Column constraints.
Source§fn render_cell(
&self,
ctx: &TableContext,
column: usize,
row: usize,
area: Rect,
buf: &mut Buffer,
)
fn render_cell( &self, ctx: &TableContext, column: usize, row: usize, area: Rect, buf: &mut Buffer, )
Render the cell given by column/row. Read more