Struct elasticsearch_dsl::search::sort::SortCollection
source · pub struct SortCollection(_);
Expand description
A sorting criteria
Implementations§
source§impl SortCollection
impl SortCollection
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new instance of SortCollection
sourcepub fn extend<T>(&mut self, sort: T)where
T: IntoIterator,
T::Item: Into<Sort>,
pub fn extend<T>(&mut self, sort: T)where
T: IntoIterator,
T::Item: Into<Sort>,
Extends sorting collection
sourcepub fn ascending<T>(self, field: T) -> Selfwhere
T: ToString,
pub fn ascending<T>(self, field: T) -> Selfwhere
T: ToString,
Add a field to sort by ascending order
sourcepub fn descending<T>(self, field: T) -> Selfwhere
T: ToString,
pub fn descending<T>(self, field: T) -> Selfwhere
T: ToString,
Add a field to sort by descending order
Trait Implementations§
source§impl Clone for SortCollection
impl Clone for SortCollection
source§fn clone(&self) -> SortCollection
fn clone(&self) -> SortCollection
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 SortCollection
impl Debug for SortCollection
source§impl Default for SortCollection
impl Default for SortCollection
source§fn default() -> SortCollection
fn default() -> SortCollection
Returns the “default value” for a type. Read more