pub enum Value {
Null,
Bool(bool),
Number(f64),
String(String),
Array(Vec<Value>),
Object(Vec<(String, Value)>),
}Expand description
A parsed JSON value.
Object members are a Vec rather than a map so that document order
survives; dictionaries are small enough that lookup by scan is not worth
a BTreeMap’s allocation per object.
Variants§
Null
null.
Bool(bool)
true or false.
Number(f64)
Any JSON number, held as f64.
String(String)
A string, with escape sequences already resolved.
Array(Vec<Value>)
An array, in order.
Object(Vec<(String, Value)>)
An object: members in the order they appeared.
Implementations§
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 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