Struct fiberplane_models::sorting::Sorting
source · #[non_exhaustive]pub struct Sorting<T: SortField> {
pub sort_by: T,
pub sort_direction: SortDirection,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.sort_by: T§sort_direction: SortDirectionImplementations§
source§impl<T: SortField> Sorting<T>
impl<T: SortField> Sorting<T>
sourcepub fn new(sort_by: T, sort_direction: SortDirection) -> Self
pub fn new(sort_by: T, sort_direction: SortDirection) -> Self
Create a new Sorting instance using the Builder.
sourcepub fn sort_ascending_by(sort_by: T) -> Self
pub fn sort_ascending_by(sort_by: T) -> Self
Sort by T and force the sort direction to be ascending.
sourcepub fn sort_descending_by(sort_by: T) -> Self
pub fn sort_descending_by(sort_by: T) -> Self
Sort by T and force the sort direction to be descending.
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Sorting<T>where
T: Deserialize<'de> + SortField,
impl<'de, T> Deserialize<'de> for Sorting<T>where
T: Deserialize<'de> + SortField,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T: PartialEq + SortField> PartialEq for Sorting<T>
impl<T: PartialEq + SortField> PartialEq for Sorting<T>
impl<T: Eq + SortField> Eq for Sorting<T>
impl<T: SortField> StructuralPartialEq for Sorting<T>
Auto Trait Implementations§
impl<T> Freeze for Sorting<T>where
T: Freeze,
impl<T> RefUnwindSafe for Sorting<T>where
T: RefUnwindSafe,
impl<T> Send for Sorting<T>where
T: Send,
impl<T> Sync for Sorting<T>where
T: Sync,
impl<T> Unpin for Sorting<T>where
T: Unpin,
impl<T> UnwindSafe for Sorting<T>where
T: UnwindSafe,
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