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