pub enum GridParameterValue {
Int(i64),
Float(f64),
Bool(bool),
String(String),
OptionalInt(Option<i64>),
OptionalFloat(Option<f64>),
}Expand description
A parameter value that can be of different types
Variants§
Int(i64)
Integer parameter
Float(f64)
Float parameter
Bool(bool)
Boolean parameter
String(String)
String parameter
OptionalInt(Option<i64>)
Option integer parameter (Some/None)
OptionalFloat(Option<f64>)
Option float parameter (Some/None)
Implementations§
Source§impl ParameterValue
impl ParameterValue
Sourcepub fn as_optional_int(&self) -> Option<Option<i64>>
pub fn as_optional_int(&self) -> Option<Option<i64>>
Extract an optional integer value
Sourcepub fn as_optional_float(&self) -> Option<Option<f64>>
pub fn as_optional_float(&self) -> Option<Option<f64>>
Extract an optional float value
Trait Implementations§
Source§impl Clone for ParameterValue
impl Clone for ParameterValue
Source§fn clone(&self) -> ParameterValue
fn clone(&self) -> ParameterValue
Returns a duplicate 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 moreSource§impl Debug for ParameterValue
impl Debug for ParameterValue
Source§impl<'de> Deserialize<'de> for ParameterValue
impl<'de> Deserialize<'de> for ParameterValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&str> for ParameterValue
impl From<&str> for ParameterValue
Source§impl From<String> for ParameterValue
impl From<String> for ParameterValue
Source§impl From<bool> for ParameterValue
impl From<bool> for ParameterValue
Source§impl From<f32> for ParameterValue
impl From<f32> for ParameterValue
Source§impl From<f64> for ParameterValue
impl From<f64> for ParameterValue
Source§impl From<i32> for ParameterValue
impl From<i32> for ParameterValue
Source§impl From<i64> for ParameterValue
impl From<i64> for ParameterValue
Source§impl Hash for ParameterValue
impl Hash for ParameterValue
Source§impl PartialEq for ParameterValue
impl PartialEq for ParameterValue
Source§impl Serialize for ParameterValue
impl Serialize for ParameterValue
impl Eq for ParameterValue
impl StructuralPartialEq for ParameterValue
Auto Trait Implementations§
impl Freeze for ParameterValue
impl RefUnwindSafe for ParameterValue
impl Send for ParameterValue
impl Sync for ParameterValue
impl Unpin for ParameterValue
impl UnwindSafe for ParameterValue
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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