Enum OptionValue
pub enum OptionValue {
Int(i64),
Float(f64),
String(String),
}
Expand description
This enum holds the possible values of a keyword/option
Variants§
Trait Implementations§
§impl Clone for OptionValue
impl Clone for OptionValue
§fn clone(&self) -> OptionValue
fn clone(&self) -> OptionValue
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 more§impl Debug for OptionValue
impl Debug for OptionValue
§impl<'de> Deserialize<'de> for OptionValue
impl<'de> Deserialize<'de> for OptionValue
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OptionValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OptionValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for OptionValue
impl Display for OptionValue
§impl<Str> From<Str> for OptionValuewhere
Str: ToString + IsString,
impl<Str> From<Str> for OptionValuewhere
Str: ToString + IsString,
§fn from(str: Str) -> OptionValue
fn from(str: Str) -> OptionValue
Converts to this type from the input type.
§impl From<f32> for OptionValue
impl From<f32> for OptionValue
§fn from(num: f32) -> OptionValue
fn from(num: f32) -> OptionValue
Converts to this type from the input type.
§impl From<f64> for OptionValue
impl From<f64> for OptionValue
§fn from(num: f64) -> OptionValue
fn from(num: f64) -> OptionValue
Converts to this type from the input type.
§impl From<i16> for OptionValue
impl From<i16> for OptionValue
§fn from(num: i16) -> OptionValue
fn from(num: i16) -> OptionValue
Converts to this type from the input type.
§impl From<i32> for OptionValue
impl From<i32> for OptionValue
§fn from(num: i32) -> OptionValue
fn from(num: i32) -> OptionValue
Converts to this type from the input type.
§impl From<i64> for OptionValue
impl From<i64> for OptionValue
§fn from(num: i64) -> OptionValue
fn from(num: i64) -> OptionValue
Converts to this type from the input type.
§impl From<i8> for OptionValue
impl From<i8> for OptionValue
§fn from(num: i8) -> OptionValue
fn from(num: i8) -> OptionValue
Converts to this type from the input type.
§impl From<u16> for OptionValue
impl From<u16> for OptionValue
§fn from(num: u16) -> OptionValue
fn from(num: u16) -> OptionValue
Converts to this type from the input type.
§impl From<u32> for OptionValue
impl From<u32> for OptionValue
§fn from(num: u32) -> OptionValue
fn from(num: u32) -> OptionValue
Converts to this type from the input type.
§impl From<u64> for OptionValue
impl From<u64> for OptionValue
§fn from(num: u64) -> OptionValue
fn from(num: u64) -> OptionValue
Converts to this type from the input type.
§impl From<u8> for OptionValue
impl From<u8> for OptionValue
§fn from(num: u8) -> OptionValue
fn from(num: u8) -> OptionValue
Converts to this type from the input type.
§impl Serialize for OptionValue
impl Serialize for OptionValue
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for OptionValue
impl RefUnwindSafe for OptionValue
impl Send for OptionValue
impl Sync for OptionValue
impl Unpin for OptionValue
impl UnwindSafe for OptionValue
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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