pub enum OptionValue {
Bool(bool),
Integer(i64),
Float(f64),
String(String),
List(Vec<OptionValue>),
Map(Options),
}Expand description
Dynamically typed loader option or nested option map.
Variants§
Implementations§
Source§impl OptionValue
impl OptionValue
pub fn new_map() -> Self
pub fn new_list() -> Self
pub fn new_string() -> Self
pub fn is_bool(&self) -> bool
pub fn as_bool(&self) -> Option<bool>
pub fn into_bool(self) -> Option<bool>
pub fn bool_mut(&mut self) -> Option<&mut bool>
pub fn is_integer(&self) -> bool
pub fn as_integer(&self) -> Option<i64>
pub fn into_integer(self) -> Option<i64>
pub fn integer_mut(&mut self) -> Option<&mut i64>
pub fn is_float(&self) -> bool
pub fn as_float(&self) -> Option<f64>
pub fn into_float(self) -> Option<f64>
pub fn float_mut(&mut self) -> Option<&mut f64>
pub fn is_string(&self) -> bool
pub fn as_string(&self) -> Option<&String>
pub fn into_string(self) -> Option<String>
pub fn string_mut(&mut self) -> Option<&mut String>
pub fn is_list(&self) -> bool
pub fn as_list(&self) -> Option<&Vec<OptionValue>>
pub fn into_list(self) -> Option<Vec<OptionValue>>
pub fn list_mut(&mut self) -> Option<&mut Vec<OptionValue>>
pub fn is_map(&self) -> bool
pub fn as_map(&self) -> Option<&Options>
pub fn into_map(self) -> Option<Options>
pub fn map_mut(&mut self) -> Option<&mut Options>
pub fn type_name(&self) -> OptionValueType
Trait Implementations§
Source§impl Clone for OptionValue
impl Clone for OptionValue
Source§fn clone(&self) -> OptionValue
fn clone(&self) -> OptionValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OptionValue
impl Debug for OptionValue
Source§impl Display for OptionValue
impl Display for OptionValue
Source§impl From<&String> for OptionValue
impl From<&String> for OptionValue
Source§impl<T: Into<OptionValue> + Clone> From<&[T]> for OptionValue
impl<T: Into<OptionValue> + Clone> From<&[T]> for OptionValue
Source§impl From<&str> for OptionValue
impl From<&str> for OptionValue
Source§impl<K: Into<String>, V: Into<OptionValue>> From<HashMap<K, V>> for OptionValue
impl<K: Into<String>, V: Into<OptionValue>> From<HashMap<K, V>> for OptionValue
Source§impl From<Options> for OptionValue
impl From<Options> for OptionValue
Source§impl From<String> for OptionValue
impl From<String> for OptionValue
Source§impl<T: Into<OptionValue>> From<Vec<T>> for OptionValue
impl<T: Into<OptionValue>> From<Vec<T>> for OptionValue
Source§impl From<bool> for OptionValue
impl From<bool> for OptionValue
Source§impl From<f32> for OptionValue
impl From<f32> for OptionValue
Source§impl From<f64> for OptionValue
impl From<f64> for OptionValue
Source§impl From<i8> for OptionValue
impl From<i8> for OptionValue
Source§impl From<i16> for OptionValue
impl From<i16> for OptionValue
Source§impl From<i32> for OptionValue
impl From<i32> for OptionValue
Source§impl From<i64> for OptionValue
impl From<i64> for OptionValue
Source§impl From<isize> for OptionValue
impl From<isize> for OptionValue
Source§impl From<u8> for OptionValue
impl From<u8> for OptionValue
Source§impl From<u16> for OptionValue
impl From<u16> for OptionValue
Source§impl From<u32> for OptionValue
impl From<u32> for OptionValue
Source§impl From<u64> for OptionValue
impl From<u64> for OptionValue
Source§impl From<usize> for OptionValue
impl From<usize> for OptionValue
Source§impl PartialEq for OptionValue
impl PartialEq for OptionValue
Source§fn eq(&self, other: &OptionValue) -> bool
fn eq(&self, other: &OptionValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OptionValue
Auto Trait Implementations§
impl Freeze for OptionValue
impl RefUnwindSafe for OptionValue
impl Send for OptionValue
impl Sync for OptionValue
impl Unpin for OptionValue
impl UnsafeUnpin 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