pub enum JsonValue {
String(String),
Number(f64),
Object(Object),
Array(Vec<JsonValue>),
Undefined,
Bool(bool),
Null,
}
Expand description
A JSON Value is the Enum containing a Value. This makes it easy to perform match operations against it.
Variants§
String(String)
This encapsulates a RUST string.
Number(f64)
Since JS uses 64Bit floats, we can use them also
Object(Object)
Another JavaScript Object containing a Map of keys and values.
Array(Vec<JsonValue>)
A JavaScript Array containing a list of values.
Undefined
The explicit undefined type
Bool(bool)
A Bool
Null
A NULL value
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JsonValue
impl RefUnwindSafe for JsonValue
impl Send for JsonValue
impl Sync for JsonValue
impl Unpin for JsonValue
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