pub enum ValueType {
Primitive(PrimitiveValue),
Array(Vec<ValuePrimitiveType>),
Nested(Map<String, ValueType>),
}Expand description
Supports primitive types string, number, boolean, null
May be an array of those types, or an object of those types
Object keys are always strings, values can be any basic type, an array, or a nested object.
Array values must all be the same type.
Variants§
Primitive(PrimitiveValue)
A primitive value
Array(Vec<ValuePrimitiveType>)
An array of values
Nested(Map<String, ValueType>)
A nested object
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ValueType
impl<'de> Deserialize<'de> for ValueType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ValueType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ValueType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ValueType
impl Serialize for ValueType
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 ValueType
Auto Trait Implementations§
impl Freeze for ValueType
impl RefUnwindSafe for ValueType
impl Send for ValueType
impl Sync for ValueType
impl Unpin for ValueType
impl UnwindSafe for ValueType
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