pub struct TermsOrder(/* private fields */);
Expand description
Terms Aggregation sorting criterion
Implementations§
Source§impl TermsOrder
impl TermsOrder
Sourcepub fn new<T>(key: T, order: SortOrder) -> Selfwhere
T: ToString,
pub fn new<T>(key: T, order: SortOrder) -> Selfwhere
T: ToString,
Creates an instance of TermsOrder
key
- Key to sort byorder
- Sorting order
Sourcepub fn ascending<T>(key: T) -> Selfwhere
T: ToString,
pub fn ascending<T>(key: T) -> Selfwhere
T: ToString,
Sorts terms by a given key in ascending order
Sourcepub fn descending<T>(key: T) -> Selfwhere
T: ToString,
pub fn descending<T>(key: T) -> Selfwhere
T: ToString,
Sorts terms by a given key in descending order
Sourcepub fn count_ascending() -> Self
pub fn count_ascending() -> Self
Sorts terms by count ascending
Sourcepub fn count_descending() -> Self
pub fn count_descending() -> Self
Sorts terms by count descending
Sourcepub fn key_ascending() -> Self
pub fn key_ascending() -> Self
Sorts terms by count ascending
Sourcepub fn key_descending() -> Self
pub fn key_descending() -> Self
Sorts terms by count descending
Trait Implementations§
Source§impl Clone for TermsOrder
impl Clone for TermsOrder
Source§fn clone(&self) -> TermsOrder
fn clone(&self) -> TermsOrder
Returns a copy of the value. Read more
1.0.0 · 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 TermsOrder
impl Debug for TermsOrder
Source§impl From<TermsOrder> for TermsOrderCollection
impl From<TermsOrder> for TermsOrderCollection
Source§fn from(value: TermsOrder) -> Self
fn from(value: TermsOrder) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TermsOrder
impl PartialEq for TermsOrder
Source§impl Serialize for TermsOrder
impl Serialize for TermsOrder
impl Eq for TermsOrder
impl StructuralPartialEq for TermsOrder
Auto Trait Implementations§
impl Freeze for TermsOrder
impl RefUnwindSafe for TermsOrder
impl Send for TermsOrder
impl Sync for TermsOrder
impl Unpin for TermsOrder
impl UnwindSafe for TermsOrder
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