pub enum Value {
Bool(bool),
Int(isize),
Float(f64),
String(String),
List(Vec<LocatedValue>),
Map(Map),
Null,
}Expand description
Dynamically typed configuration value.
Variants§
Implementations§
Source§impl Value
impl Value
pub fn new_map() -> Value
pub fn new_list() -> Value
pub fn new_string() -> Value
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_int(&self) -> bool
pub fn as_int(&self) -> Option<isize>
pub fn into_int(self) -> Option<isize>
pub fn int_mut(&mut self) -> Option<&mut isize>
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<LocatedValue>>
pub fn into_list(self) -> Option<Vec<LocatedValue>>
pub fn list_mut(&mut self) -> Option<&mut Vec<LocatedValue>>
pub fn is_map(&self) -> bool
pub fn as_map(&self) -> Option<&Map>
pub fn into_map(self) -> Option<Map>
pub fn map_mut(&mut self) -> Option<&mut Map>
pub fn is_null(&self) -> bool
pub fn type_name(&self) -> ValueType
Trait Implementations§
Source§impl AsRef<Value> for LocatedValue
impl AsRef<Value> for LocatedValue
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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