[][src]Struct rs_es::operations::search::Sort

pub struct Sort { /* fields omitted */ }

A full sort clause

Methods

impl Sort[src]

pub fn new(fields: Vec<SortBy>) -> Self[src]

pub fn field<S: Into<String>>(fieldname: S) -> Self[src]

Convenience function for a single field default

pub fn field_order<S: Into<String>>(fieldname: S, order: Order) -> Self[src]

pub fn fields<S: Into<String>>(fieldnames: Vec<S>) -> Self[src]

pub fn field_orders<S: Into<String>>(fields: Vec<(S, Order)>) -> Self[src]

Trait Implementations

impl<'a> From<&'a Sort> for OptionVal[src]

Conversion of a Sort into an OptionVal for use in search-by-URI queries

use rs_es::operations::common::OptionVal;
use rs_es::operations::search::{Sort, SortField, Order};
let sort = Sort::new(vec![SortField::new("a", Some(Order::Asc)).build(),
                                    SortField::new("b", None).build()]);
let op_val:OptionVal = (&sort).into();
assert_eq!("a:asc,b", op_val.0);

impl Debug for Sort[src]

impl Serialize for Sort[src]

Auto Trait Implementations

impl Sync for Sort

impl Send for Sort

impl Unpin for Sort

impl RefUnwindSafe for Sort

impl UnwindSafe for Sort

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err