pub enum Value {
Zero,
Int(i64),
Float(f32),
Double(f64),
String(String),
Bytes(Vec<u8>),
List(Vec<Value>),
Map(BTreeMap<Value, Value>),
Object(BTreeMap<u8, Value>),
}Variants§
Zero
Int(i64)
Float(f32)
Double(f64)
String(String)
Bytes(Vec<u8>)
List(Vec<Value>)
Map(BTreeMap<Value, Value>)
Object(BTreeMap<u8, Value>)
Implementations§
Source§impl Value
impl Value
pub fn int(self) -> Option<i64>
pub fn int_ref(&self) -> Option<&i64>
pub fn int_mut(&mut self) -> Option<&mut i64>
pub fn float(self) -> Option<f32>
pub fn float_ref(&self) -> Option<&f32>
pub fn float_mut(&mut self) -> Option<&mut f32>
pub fn double(self) -> Option<f64>
pub fn double_ref(&self) -> Option<&f64>
pub fn double_mut(&mut self) -> Option<&mut f64>
pub fn string(self) -> Option<String>
pub fn string_ref(&self) -> Option<&String>
pub fn string_mut(&mut self) -> Option<&mut String>
pub fn bytes(self) -> Option<Vec<u8>>
pub fn bytes_ref(&self) -> Option<&Vec<u8>>
pub fn bytes_mut(&mut self) -> Option<&mut Vec<u8>>
pub fn list(self) -> Option<Vec<Value>>
pub fn list_ref(&self) -> Option<&Vec<Value>>
pub fn list_mut(&mut self) -> Option<&mut Vec<Value>>
pub fn map(self) -> Option<Map<Value, Value>>
pub fn map_ref(&self) -> Option<&Map<Value, Value>>
pub fn map_mut(&mut self) -> Option<&mut Map<Value, Value>>
pub fn obj(self) -> Option<Map<u8, Value>>
pub fn obj_ref(&self) -> Option<&Map<u8, Value>>
pub fn obj_mut(&mut self) -> Option<&mut Map<u8, Value>>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
Source§fn deserialize<D>(deserializer: D) -> Result<Value, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Value, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Value
impl Ord for Value
Source§impl PartialOrd for Value
impl PartialOrd for Value
impl Eq 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