pub enum JsonObject {
Array(Vec<Self>),
Obj(Vec<(String, Self)>),
Number(f64),
JsonStr(String),
Bool(bool),
Null,
}
Expand description
Variants§
Array(Vec<Self>)
An array of objects (e.g.: [1,2,3])
Obj(Vec<(String, Self)>)
Key-value pairs (e.g.: {"first": 10, "other": 15})
Number(f64)
A number (e.g.: -0.08333)
JsonStr(String)
A string (e.g.: "Test: \"")
Bool(bool)
A boolean (e.g. true)
Null
The null-value
Implementations§
Trait Implementations§
Source§impl Clone for JsonObject
impl Clone for JsonObject
Source§fn clone(&self) -> JsonObject
fn clone(&self) -> JsonObject
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for JsonObject
impl Debug for JsonObject
Source§impl Default for JsonObject
impl Default for JsonObject
Source§fn default() -> Self
fn default() -> Self
The default value is JsonObject::Null
Source§impl Display for JsonObject
impl Display for JsonObject
Source§impl Ord for JsonObject
impl Ord for JsonObject
Save because no not-number values are allowed in json
Source§impl PartialEq for JsonObject
impl PartialEq for JsonObject
Source§impl PartialOrd for JsonObject
impl PartialOrd for JsonObject
impl Eq for JsonObject
Save because no not-number values are allowed in json
impl StructuralPartialEq for JsonObject
Auto Trait Implementations§
impl Freeze for JsonObject
impl RefUnwindSafe for JsonObject
impl Send for JsonObject
impl Sync for JsonObject
impl Unpin for JsonObject
impl UnwindSafe for JsonObject
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