pub enum JsonValue {
Null,
Bool(bool),
Int(i64),
Float(f64),
String(String),
Array(Vec<JsonValue>),
Object(BTreeMap<String, JsonValue>),
}Expand description
Minimal JSON value representation with zero external dependencies.
BTreeMap<String, JsonValue> preserves ascending Unicode code-point order
because Rust String ordering compares UTF-8 bytes, which matches code-point order.
Variants§
Null
Bool(bool)
Int(i64)
Float(f64)
String(String)
Array(Vec<JsonValue>)
Object(BTreeMap<String, JsonValue>)
Implementations§
Trait Implementations§
impl StructuralPartialEq for JsonValue
Auto Trait Implementations§
impl Forget for JsonValue
impl Freeze for JsonValuewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<JsonValue>: Freeze,
*const LeafNode<String, JsonValue> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, JsonValue)>>: Freeze,
impl Move for JsonValue
impl RefUnwindSafe for JsonValue
impl Send for JsonValue
impl Sync for JsonValue
impl Unpin for JsonValue
impl UnsafeUnpin for JsonValuewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<JsonValue>: UnsafeUnpin,
*const LeafNode<String, JsonValue> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, JsonValue)>>: UnsafeUnpin,
impl UnwindSafe for JsonValue
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