pub struct Table<'a> { /* private fields */ }Expand description
A widget to display data in a table.
Implementations§
Source§impl<'a> Table<'a>
impl<'a> Table<'a>
Sourcepub fn new(
rows: impl IntoIterator<Item = Row>,
widths: impl IntoIterator<Item = Constraint>,
) -> Self
pub fn new( rows: impl IntoIterator<Item = Row>, widths: impl IntoIterator<Item = Constraint>, ) -> Self
Create a new table with the given rows and column width constraints.
Sourcepub fn highlight_style(self, style: Style) -> Self
pub fn highlight_style(self, style: Style) -> Self
Set the style for the selected row.
Sourcepub fn theme(self, theme: TableTheme) -> Self
pub fn theme(self, theme: TableTheme) -> Self
Set the table theme (base/states/effects).
Sourcepub fn theme_phase(self, phase: f32) -> Self
pub fn theme_phase(self, phase: f32) -> Self
Set the explicit animation phase for theme effects.
Phase is deterministic and should be supplied by the caller (e.g. from tick count).
Sourcepub fn column_spacing(self, spacing: u16) -> Self
pub fn column_spacing(self, spacing: u16) -> Self
Set the spacing between columns.
Trait Implementations§
Source§impl MeasurableWidget for Table<'_>
impl MeasurableWidget for Table<'_>
Source§impl<'a> StatefulWidget for Table<'a>
impl<'a> StatefulWidget for Table<'a>
Auto Trait Implementations§
impl<'a> Freeze for Table<'a>
impl<'a> RefUnwindSafe for Table<'a>
impl<'a> Send for Table<'a>
impl<'a> Sync for Table<'a>
impl<'a> Unpin for Table<'a>
impl<'a> UnwindSafe for Table<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more