pub struct SearchSort { /* private fields */ }Expand description
A sort instruction for search results.
Implementations§
Source§impl SearchSort
impl SearchSort
Sourcepub const fn ascending(field: SearchField) -> SearchSort
pub const fn ascending(field: SearchField) -> SearchSort
Creates an ascending sort.
Sourcepub const fn descending(field: SearchField) -> SearchSort
pub const fn descending(field: SearchField) -> SearchSort
Creates a descending sort.
Sourcepub const fn field(&self) -> &SearchField
pub const fn field(&self) -> &SearchField
Returns the sort field.
Sourcepub const fn is_descending(&self) -> bool
pub const fn is_descending(&self) -> bool
Returns whether the sort is descending.
Trait Implementations§
Source§impl Clone for SearchSort
impl Clone for SearchSort
Source§fn clone(&self) -> SearchSort
fn clone(&self) -> SearchSort
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SearchSort
impl Debug for SearchSort
Source§impl PartialEq for SearchSort
impl PartialEq for SearchSort
Source§fn eq(&self, other: &SearchSort) -> bool
fn eq(&self, other: &SearchSort) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SearchSort
impl StructuralPartialEq for SearchSort
Auto Trait Implementations§
impl Freeze for SearchSort
impl RefUnwindSafe for SearchSort
impl Send for SearchSort
impl Sync for SearchSort
impl Unpin for SearchSort
impl UnsafeUnpin for SearchSort
impl UnwindSafe for SearchSort
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