pub enum SortBy {
Fixed(Direction),
Reversible(Direction),
}Expand description
Describes how a field should be sorted. Returned by Sortable::sort_by.
Variants§
Fixed(Direction)
This field is limited to being sorted in the one direction specified.
Reversible(Direction)
This field can be sorted in either direction. The direction specifies the initial direction. Fields of this sort can be toggled between directions.
Implementations§
Source§impl SortBy
impl SortBy
Sourcepub fn unsortable() -> Option<Self>
pub fn unsortable() -> Option<Self>
Field may not be sorted. Convenience fn for specifying how a field may be sorted.
Sourcepub fn increasing() -> Option<Self>
pub fn increasing() -> Option<Self>
Field may only be sorted in ascending order.
Sourcepub fn decreasing() -> Option<Self>
pub fn decreasing() -> Option<Self>
Field may only be sorted in descending order.
Sourcepub fn increasing_or_decreasing() -> Option<Self>
pub fn increasing_or_decreasing() -> Option<Self>
Field may be sorted in either direction. The initial direction is ascending. This is the default.
Sourcepub fn decreasing_or_increasing() -> Option<Self>
pub fn decreasing_or_increasing() -> Option<Self>
Field may be sorted in either direction. The initial direction is descending.
Trait Implementations§
impl Copy for SortBy
impl StructuralPartialEq for SortBy
Auto Trait Implementations§
impl Freeze for SortBy
impl RefUnwindSafe for SortBy
impl Send for SortBy
impl Sync for SortBy
impl Unpin for SortBy
impl UnwindSafe for SortBy
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