pub enum Value {
Bool(bool),
Int(i64),
Float(f64),
String(String),
Array(Vec<Value>, ArrayType),
Object(IndexMap<String, Value>),
}
Variants§
Bool(bool)
Int(i64)
Float(f64)
String(String)
Array(Vec<Value>, ArrayType)
Object(IndexMap<String, Value>)
Implementations§
Source§impl Value
impl Value
pub fn obj_from_str( input: &str, ) -> Result<IndexMap<String, Value>, VerboseError<&str>>
pub fn as_bool(&self) -> Option<&bool>
pub fn as_bool_mut(&mut self) -> Option<&mut bool>
pub fn as_int(&self) -> Option<&i64>
pub fn as_int_mut(&mut self) -> Option<&mut i64>
pub fn as_float(&self) -> Option<&f64>
pub fn as_float_mut(&mut self) -> Option<&mut f64>
pub fn as_str(&self) -> Option<&str>
pub fn as_str_mut(&mut self) -> Option<&mut String>
pub fn as_vec(&self) -> Option<&Vec<Value>>
pub fn as_vec_mut(&mut self) -> Option<&mut Vec<Value>>
pub fn as_obj(&self) -> Option<&IndexMap<String, Value>>
pub fn as_obj_mut(&mut self) -> Option<&mut IndexMap<String, Value>>
Trait Implementations§
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 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