pub enum ConfigVal {
Bool(bool),
U32(u32),
Usize(usize),
OptUsize(Option<usize>),
F64(f64),
String(String),
Duration(Duration),
Json(Value),
}
Expand description
A type-erased configuration value for when set of different types are stored in a collection.
Variants§
Bool(bool)
A bool
value.
U32(u32)
A u32
value.
Usize(usize)
A usize
value.
OptUsize(Option<usize>)
An Option<usize>
value.
F64(f64)
An f64
value.
String(String)
A String
value.
Duration(Duration)
A Duration
value.
Json(Value)
A JSON value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ConfigVal
impl<'de> Deserialize<'de> for ConfigVal
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<ConfigVal> for ConfigValAtomic
impl From<ConfigVal> for ConfigValAtomic
Source§fn from(val: ConfigVal) -> ConfigValAtomic
fn from(val: ConfigVal) -> ConfigValAtomic
Converts to this type from the input type.
impl StructuralPartialEq for ConfigVal
Auto Trait Implementations§
impl Freeze for ConfigVal
impl RefUnwindSafe for ConfigVal
impl Send for ConfigVal
impl Sync for ConfigVal
impl Unpin for ConfigVal
impl UnwindSafe for ConfigVal
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