pub struct TableState {
pub offset: usize,
pub selected: Option<usize>,
pub selected_column: Option<usize>,
}Expand description
Fields§
§offset: usize§selected: Option<usize>§selected_column: Option<usize>Implementations§
Source§impl TableState
impl TableState
Sourcepub fn new(offset: usize) -> Self
pub fn new(offset: usize) -> Self
Creates a new TableState with the given scroll offset, no
selected item and no selected column.
Sourcepub fn selected_column<T>(self, selected: T) -> Self
pub fn selected_column<T>(self, selected: T) -> Self
Sets the selected column to the given value
Trait Implementations§
Source§impl Clone for TableState
impl Clone for TableState
Source§fn clone(&self) -> TableState
fn clone(&self) -> TableState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TableState
impl Debug for TableState
Source§impl Default for TableState
impl Default for TableState
Source§fn default() -> TableState
fn default() -> TableState
Returns the “default value” for a type. Read more
Source§impl PartialEq for TableState
impl PartialEq for TableState
impl Eq for TableState
impl StructuralPartialEq for TableState
Auto Trait Implementations§
impl Freeze for TableState
impl RefUnwindSafe for TableState
impl Send for TableState
impl Sync for TableState
impl Unpin for TableState
impl UnwindSafe for TableState
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