pub struct OptionVal(pub String);Expand description
A newtype for the value of a URI option, this is to allow conversion traits to be implemented for it
Tuple Fields§
§0: StringTrait Implementations§
Source§impl<'a> From<&'a Sort> for OptionVal
Conversion of a Sort into an OptionVal for use in search-by-URI queries
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);Source§impl From<Consistency> for OptionVal
impl From<Consistency> for OptionVal
Source§fn from(from: Consistency) -> OptionVal
fn from(from: Consistency) -> OptionVal
Converts to this type from the input type.
Source§impl From<DefaultOperator> for OptionVal
impl From<DefaultOperator> for OptionVal
Source§fn from(from: DefaultOperator) -> OptionVal
fn from(from: DefaultOperator) -> OptionVal
Converts to this type from the input type.
Source§impl From<Preference> for OptionVal
impl From<Preference> for OptionVal
Source§fn from(from: Preference) -> OptionVal
fn from(from: Preference) -> OptionVal
Converts to this type from the input type.
Source§impl From<VersionType> for OptionVal
impl From<VersionType> for OptionVal
Source§fn from(from: VersionType) -> OptionVal
fn from(from: VersionType) -> OptionVal
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OptionVal
impl RefUnwindSafe for OptionVal
impl Send for OptionVal
impl Sync for OptionVal
impl Unpin for OptionVal
impl UnwindSafe for OptionVal
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more