Struct rs_es::operations::common::OptionVal [] [src]

pub struct OptionVal(pub String);

A newtype for the value of a URI option, this is to allow conversion traits to be implemented for it

Trait Implementations

impl<'a> From<&'a str> for OptionVal

Conversion from &str to OptionVal

fn from(from: &'a str) -> OptionVal

impl From<String> for OptionVal

fn from(from: String) -> OptionVal

impl From<i32> for OptionVal

fn from(from: i32) -> OptionVal

impl From<i64> for OptionVal

fn from(from: i64) -> OptionVal

impl From<u32> for OptionVal

fn from(from: u32) -> OptionVal

impl From<u64> for OptionVal

fn from(from: u64) -> OptionVal

impl From<bool> for OptionVal

fn from(from: bool) -> OptionVal

impl From<VersionType> for OptionVal

fn from(from: VersionType) -> OptionVal

impl From<Consistency> for OptionVal

fn from(from: Consistency) -> OptionVal

impl From<DefaultOperator> for OptionVal

fn from(from: DefaultOperator) -> OptionVal

impl From<Preference> for OptionVal

fn from(from: Preference) -> OptionVal

impl From<OpType> for OptionVal

fn from(from: OpType) -> OptionVal

impl<'a> From<&'a Sort> for OptionVal

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);

fn from(from: &'a Sort) -> OptionVal

impl<'a> From<&'a Duration> for OptionVal

fn from(from: &'a Duration) -> OptionVal

impl From<Duration> for OptionVal

fn from(from: Duration) -> OptionVal