Skip to main content

TableViewSort

Struct TableViewSort 

Source
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

Source

pub fn new(app: &mut App) -> Ref<Self>

Creates a sort no table holds yet.

Source

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.

Source

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.

Source

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§

Source§

impl Debug for TableViewSort

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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
where NonZero<u32>: Freeze, *const RcInner<dyn Fn(&mut App, SortRequest) -> bool> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, SortRequest) -> bool>>: Freeze,

§

impl Move for TableViewSort

§

impl Unpin for TableViewSort
where NonZero<u32>: Unpin, Rc<dyn Fn(&mut App, SortRequest) -> bool>: Unpin,

§

impl UnsafeUnpin for TableViewSort
where 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>