pub enum JSONValue {
Primitive(PrimitiveValue),
Array(Vec<JSONValue>),
Object(JSONProperties),
}
Expand description
All possible JSON shapes
Variants§
Primitive(PrimitiveValue)
Represents a JSON primitive
Array(Vec<JSONValue>)
Represents a JSON array.
Object(JSONProperties)
Represents a JSON object.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JSONValue
impl<'de> Deserialize<'de> for JSONValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&JSONValue> for JSONProperties
impl From<&JSONValue> for JSONProperties
Source§impl From<&JSONValue> for PrimitiveValue
impl From<&JSONValue> for PrimitiveValue
Source§impl From<&JSONValue> for ValuePrimitiveType
impl From<&JSONValue> for ValuePrimitiveType
Source§impl From<&Map<String, JSONValue>> for JSONValue
impl From<&Map<String, JSONValue>> for JSONValue
Source§fn from(v: &JSONProperties) -> Self
fn from(v: &JSONProperties) -> Self
Converts to this type from the input type.
Source§impl From<&PrimitiveValue> for JSONValue
impl From<&PrimitiveValue> for JSONValue
Source§fn from(v: &PrimitiveValue) -> Self
fn from(v: &PrimitiveValue) -> Self
Converts to this type from the input type.
Source§impl From<&ValuePrimitiveType> for JSONValue
impl From<&ValuePrimitiveType> for JSONValue
Source§fn from(v: &ValuePrimitiveType) -> Self
fn from(v: &ValuePrimitiveType) -> Self
Converts to this type from the input type.
Source§impl From<JSONValue> for JSONProperties
impl From<JSONValue> for JSONProperties
Source§impl From<Map<String, JSONValue>> for JSONValue
impl From<Map<String, JSONValue>> for JSONValue
Source§fn from(v: JSONProperties) -> Self
fn from(v: JSONProperties) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for JSONValue
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