pub enum Value {
Null,
Int(u64),
NegativeInt(u64),
String(String),
Bytes(Vec<u8>),
Text(String),
Array(Vec<Value>),
Map(BTreeMap<Value, Value>),
}
Variants§
Null
Int(u64)
NegativeInt(u64)
String(String)
Bytes(Vec<u8>)
Text(String)
Array(Vec<Value>)
Map(BTreeMap<Value, Value>)
Implementations§
Source§impl Value
impl Value
pub fn as_array(&self) -> Option<&Vec<Value>>
pub fn as_array_mut(&mut self) -> Option<&mut Vec<Value>>
pub fn as_bytes(&self) -> Option<&Vec<u8>>
pub fn as_bytes_mut(&mut self) -> Option<&mut Vec<u8>>
pub fn as_string(&self) -> Option<&String>
pub fn as_string_mut(&mut self) -> Option<&mut String>
pub fn as_int(&self) -> Option<u64>
pub fn as_map(&self) -> Option<&BTreeMap<Value, Value>>
pub fn as_map_mut(&mut self) -> Option<&BTreeMap<Value, Value>>
Trait Implementations§
Source§impl Ord for Value
impl Ord for Value
Source§impl PartialOrd for Value
impl PartialOrd for Value
Source§impl Serialize for Value
impl Serialize for Value
fn serialize<S>(&mut self, serializer: &mut S)where
S: Serializer,
impl Eq for Value
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