pub struct OrderBy { /* private fields */ }Expand description
A field sort minus the field — a direction plus the field-sort modifiers,
ready to attach to whatever handle SortBuilder::by is given.
This is what a consumer converts its own request enum into, once
(impl From<MyDir> for OrderBy). It carries full parity with Sort’s
field-sort options; everything but the direction defaults to unset.
Implementations§
Source§impl OrderBy
impl OrderBy
Sourcepub fn missing_first(self) -> Self
pub fn missing_first(self) -> Self
Place documents missing this field first.
Sourcepub fn missing_last(self) -> Self
pub fn missing_last(self) -> Self
Place documents missing this field last.
Sourcepub fn missing(self, value: impl Into<Value>) -> Self
pub fn missing(self, value: impl Into<Value>) -> Self
Substitute a literal value for documents missing this field.
Sourcepub fn numeric_type(self, numeric_type: NumericType) -> Self
pub fn numeric_type(self, numeric_type: NumericType) -> Self
Numeric type to sort as, for cross-index type coercion.
Sourcepub fn unmapped_type(self, unmapped_type: impl Into<String>) -> Self
pub fn unmapped_type(self, unmapped_type: impl Into<String>) -> Self
Type to assume when the field is unmapped on some shard.
Trait Implementations§
Source§impl From<OrderBy> for MaybeOrderBy
impl From<OrderBy> for MaybeOrderBy
Auto Trait Implementations§
impl Freeze for OrderBy
impl RefUnwindSafe for OrderBy
impl Send for OrderBy
impl Sync for OrderBy
impl Unpin for OrderBy
impl UnsafeUnpin for OrderBy
impl UnwindSafe for OrderBy
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