pub struct TableViewSort { /* private fields */ }Expand description
Sorting a TableView from code.
The application makes one with TableViewSort::new, and gives it to the table with TableView::sort. Until a mounted table holds it, every request answers false.
Implementations§
Source§impl TableViewSort
impl TableViewSort
Sourcepub fn sort_by_column<T: 'static>(
self: Handle<Self>,
app: &mut App,
column: &Ref<TableViewColumn<T>>,
direction: SortDirection,
) -> bool
pub fn sort_by_column<T: 'static>( self: Handle<Self>, app: &mut App, column: &Ref<TableViewColumn<T>>, direction: SortDirection, ) -> bool
SortByColumn: clears any other column’s sort, then sorts column in direction; None clears it. Raises Sorting, which can cancel, then Sorted. Answers whether the sort state changed.
Sourcepub fn toggle_sort_direction<T: 'static>(
self: Handle<Self>,
app: &mut App,
column: &Ref<TableViewColumn<T>>,
) -> bool
pub fn toggle_sort_direction<T: 'static>( self: Handle<Self>, app: &mut App, column: &Ref<TableViewColumn<T>>, ) -> bool
ToggleSortDirection: the column’s next direction in its SortCycle, any other column’s sort cleared first.
Sourcepub fn clear_sort(self: Handle<Self>, app: &mut App) -> bool
pub fn clear_sort(self: Handle<Self>, app: &mut App) -> bool
ClearSort: every column’s sort, in one change. Answers whether anything was cleared.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TableViewSort
impl !Send for TableViewSort
impl !Sync for TableViewSort
impl !UnwindSafe for TableViewSort
impl Forget for TableViewSort
impl Freeze for TableViewSort
impl Move for TableViewSort
impl Unpin for TableViewSort
impl UnsafeUnpin for TableViewSortwhere
NonZeroU32Inner: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, SortRequest) -> bool> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, SortRequest) -> bool>>: UnsafeUnpin,
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