pub enum Value {
Null,
Bool(bool),
UInt(u64),
Int(i64),
Float(f64),
Str(String),
Bytes(Vec<u8>),
Array(Vec<Value>),
Object(Vec<(String, Value)>),
}Expand description
Owned, schema-less Crous value (analogous to serde_json::Value).
This type owns all its data and can be freely moved, cloned, and serialized.
Variants§
Null
Null / absent value.
Bool(bool)
Boolean.
UInt(u64)
Unsigned integer (up to u64).
Int(i64)
Signed integer (i64).
Float(f64)
64-bit IEEE 754 float.
Str(String)
UTF-8 string.
Bytes(Vec<u8>)
Raw binary blob.
Array(Vec<Value>)
Ordered array of values.
Object(Vec<(String, Value)>)
Ordered map of key-value pairs (keys are strings). Uses Vec to preserve insertion order (deterministic encoding).
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