pub enum Value {
Null,
Bool(bool),
Int(i64),
Float(f64),
Str(String),
Arr(Vec<Value>),
Obj(Vec<(String, Value)>),
}Expand description
A runtime value. Object key ordering is preserved via a Vec of pairs so that
canonical serialization can apply an explicit code-point sort (a BTreeMap
would impose String Ord which — while it happens to equal code-point order —
we keep explicit for clarity and insertion-order retention where required).
Variants§
Null
Bool(bool)
Int(i64)
Float(f64)
Str(String)
Arr(Vec<Value>)
Obj(Vec<(String, Value)>)
Object: insertion-ordered key/value pairs.
Implementations§
Trait Implementations§
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