pub enum Value {
Static(StaticNode),
String(String),
Array(Box<Vec<Value>>),
Object(Box<Object>),
}
Expand description
Owned JSON-DOM Value, consider using the ValueTrait
to access it’s content.
This is slower then the BorrowedValue
as a tradeoff
for getting rid of lifetimes.
Variants§
Static(StaticNode)
Static values
String(String)
string type
Array(Box<Vec<Value>>)
array type
Object(Box<Object>)
object type
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
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>,
Source§impl<'de> Deserializer<'de> for &'de Value
impl<'de> Deserializer<'de> for &'de Value
Source§type Error = Error
type Error = Error
Source§fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error>where
V: Visitor<'de>,
fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error>where
V: Visitor<'de>,
Deserializer
to figure out how to drive the visitor based
on what data type is in the input. Read moreSource§fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error>where
V: Visitor<'de>,
fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error>where
V: Visitor<'de>,
Deserialize
type is expecting an optional value. Read moreSource§fn deserialize_newtype_struct<V>(
self,
_name: &'static str,
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
fn deserialize_newtype_struct<V>(
self,
_name: &'static str,
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
Deserialize
type is expecting a newtype struct with a
particular name.Source§fn deserialize_struct<V>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
fn deserialize_struct<V>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
Deserialize
type is expecting a struct with a particular
name and fields.Source§fn deserialize_enum<V>(
self,
_name: &str,
_variants: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
fn deserialize_enum<V>(
self,
_name: &str,
_variants: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
Deserialize
type is expecting an enum value with a
particular name and possible variants.Source§fn deserialize_bool<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_bool<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a bool
value.Source§fn deserialize_i8<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i8<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i8
value.Source§fn deserialize_i16<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i16<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i16
value.Source§fn deserialize_i32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i32
value.Source§fn deserialize_i64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i64
value.Source§fn deserialize_i128<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i128<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Source§fn deserialize_u8<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u8<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u8
value.Source§fn deserialize_u16<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u16<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u16
value.Source§fn deserialize_u32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u32
value.Source§fn deserialize_u64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u64
value.Source§fn deserialize_u128<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u128<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Source§fn deserialize_f32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_f32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a f32
value.Source§fn deserialize_f64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_f64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a f64
value.Source§fn deserialize_char<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_char<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a char
value.Source§fn deserialize_str<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_str<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a string value and does
not benefit from taking ownership of buffered data owned by the
Deserializer
. Read moreSource§fn deserialize_string<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_string<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a string value and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read moreSource§fn deserialize_bytes<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_bytes<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a byte array and does not
benefit from taking ownership of buffered data owned by the
Deserializer
. Read moreSource§fn deserialize_byte_buf<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_byte_buf<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a byte array and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read moreSource§fn deserialize_unit<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_unit<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a unit value.Source§fn deserialize_unit_struct<V>(
self,
name: &'static str,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_unit_struct<V>(
self,
name: &'static str,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a unit struct with a
particular name.Source§fn deserialize_seq<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_seq<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a sequence of values.Source§fn deserialize_tuple<V>(
self,
len: usize,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_tuple<V>(
self,
len: usize,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a sequence of values and
knows how many values there are without looking at the serialized data.Source§fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a tuple struct with a
particular name and number of fields.Source§fn deserialize_map<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_map<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a map of key-value pairs.Source§fn deserialize_identifier<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_identifier<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting the name of a struct
field or the discriminant of an enum variant.Source§fn deserialize_ignored_any<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_ignored_any<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type needs to deserialize a value whose type
doesn’t matter because it is ignored. Read moreSource§fn is_human_readable(&self) -> bool
fn is_human_readable(&self) -> bool
Deserialize
implementations should expect to
deserialize their human-readable form. Read moreSource§impl<'de> Deserializer<'de> for Value
impl<'de> Deserializer<'de> for Value
Source§type Error = Error
type Error = Error
Source§fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error>where
V: Visitor<'de>,
fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error>where
V: Visitor<'de>,
Deserializer
to figure out how to drive the visitor based
on what data type is in the input. Read moreSource§fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error>where
V: Visitor<'de>,
fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error>where
V: Visitor<'de>,
Deserialize
type is expecting an optional value. Read moreSource§fn deserialize_enum<V>(
self,
_name: &str,
_variants: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
fn deserialize_enum<V>(
self,
_name: &str,
_variants: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
Deserialize
type is expecting an enum value with a
particular name and possible variants.Source§fn deserialize_newtype_struct<V>(
self,
_name: &'static str,
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
fn deserialize_newtype_struct<V>(
self,
_name: &'static str,
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
Deserialize
type is expecting a newtype struct with a
particular name.Source§fn deserialize_struct<V>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
fn deserialize_struct<V>(
self,
_name: &'static str,
_fields: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Error>where
V: Visitor<'de>,
Deserialize
type is expecting a struct with a particular
name and fields.Source§fn deserialize_bool<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_bool<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a bool
value.Source§fn deserialize_i8<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i8<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i8
value.Source§fn deserialize_i16<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i16<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i16
value.Source§fn deserialize_i32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i32
value.Source§fn deserialize_i64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting an i64
value.Source§fn deserialize_i128<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_i128<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Source§fn deserialize_u8<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u8<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u8
value.Source§fn deserialize_u16<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u16<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u16
value.Source§fn deserialize_u32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u32
value.Source§fn deserialize_u64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a u64
value.Source§fn deserialize_u128<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_u128<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Source§fn deserialize_f32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_f32<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a f32
value.Source§fn deserialize_f64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_f64<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a f64
value.Source§fn deserialize_char<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_char<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a char
value.Source§fn deserialize_str<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_str<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a string value and does
not benefit from taking ownership of buffered data owned by the
Deserializer
. Read moreSource§fn deserialize_string<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_string<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a string value and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read moreSource§fn deserialize_bytes<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_bytes<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a byte array and does not
benefit from taking ownership of buffered data owned by the
Deserializer
. Read moreSource§fn deserialize_byte_buf<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_byte_buf<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a byte array and would
benefit from taking ownership of buffered data owned by the
Deserializer
. Read moreSource§fn deserialize_unit<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_unit<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a unit value.Source§fn deserialize_unit_struct<V>(
self,
name: &'static str,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_unit_struct<V>(
self,
name: &'static str,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a unit struct with a
particular name.Source§fn deserialize_seq<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_seq<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a sequence of values.Source§fn deserialize_tuple<V>(
self,
len: usize,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_tuple<V>(
self,
len: usize,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a sequence of values and
knows how many values there are without looking at the serialized data.Source§fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a tuple struct with a
particular name and number of fields.Source§fn deserialize_map<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_map<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting a map of key-value pairs.Source§fn deserialize_identifier<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_identifier<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type is expecting the name of a struct
field or the discriminant of an enum variant.Source§fn deserialize_ignored_any<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
fn deserialize_ignored_any<V>(
self,
visitor: V,
) -> Result<V::Value, <Self as Deserializer<'de>>::Error>where
V: Visitor<'de>,
Deserialize
type needs to deserialize a value whose type
doesn’t matter because it is ignored. Read moreSource§fn is_human_readable(&self) -> bool
fn is_human_readable(&self) -> bool
Deserialize
implementations should expect to
deserialize their human-readable form. Read moreSource§impl From<StaticNode> for Value
impl From<StaticNode> for Value
Source§fn from(s: StaticNode) -> Self
fn from(s: StaticNode) -> Self
Source§impl From<Value<'_>> for Value
impl From<Value<'_>> for Value
Source§fn from(b: BorrowedValue<'_>) -> Self
fn from(b: BorrowedValue<'_>) -> Self
Source§impl<'value> From<Value> for Value<'value>
impl<'value> From<Value> for Value<'value>
Source§fn from(b: OwnedValue) -> Self
fn from(b: OwnedValue) -> Self
Source§impl<V: Into<Value>> FromIterator<V> for Value
impl<V: Into<Value>> FromIterator<V> for Value
Source§fn from_iter<I: IntoIterator<Item = V>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = V>>(iter: I) -> Self
Source§impl<'de> IntoDeserializer<'de, Error> for Value
impl<'de> IntoDeserializer<'de, Error> for Value
Source§type Deserializer = Value
type Deserializer = Value
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Source§impl TryFrom<Value> for OwnedValue
impl TryFrom<Value> for OwnedValue
Source§type Error = SerdeConversionError
type Error = SerdeConversionError
Source§impl TryInto<Value> for OwnedValue
impl TryInto<Value> for OwnedValue
Source§type Error = SerdeConversionError
type Error = SerdeConversionError
Source§impl TypedValue for Value
impl TypedValue for Value
Source§fn value_type(&self) -> ValueType
fn value_type(&self) -> ValueType
Source§impl ValueAsArray for Value
impl ValueAsArray for Value
Source§impl ValueAsMutArray for Value
impl ValueAsMutArray for Value
Source§impl ValueAsMutObject for Value
impl ValueAsMutObject for Value
Source§impl ValueAsObject for Value
impl ValueAsObject for Value
Source§impl ValueAsScalar for Value
impl ValueAsScalar for Value
Source§impl<'input> ValueBuilder<'input> for Value
impl<'input> ValueBuilder<'input> for Value
Source§fn array_with_capacity(capacity: usize) -> Self
fn array_with_capacity(capacity: usize) -> Self
Source§fn object_with_capacity(capacity: usize) -> Self
fn object_with_capacity(capacity: usize) -> Self
Source§impl ValueIntoArray for Value
impl ValueIntoArray for Value
Source§impl ValueIntoObject for Value
impl ValueIntoObject for Value
Source§fn into_object(self) -> Option<<Value as ValueIntoObject>::Object>
fn into_object(self) -> Option<<Value as ValueIntoObject>::Object>
Source§impl ValueIntoString for Value
impl ValueIntoString for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> MutableArray for T
impl<T> MutableArray for T
Source§fn pop(&mut self) -> Result<Option<<T as MutableArray>::Target>, AccessError>
fn pop(&mut self) -> Result<Option<<T as MutableArray>::Target>, AccessError>
Pops from this Value
as an Array
.
Will return an AccessError::NotAnArray
if called
on a Value
that isn’t an Array
- otherwise will
behave the same as Vec::pop
§Errors
Will return Err
if self
is not an array.
Source§fn push<V>(&mut self, v: V) -> Result<(), AccessError>
fn push<V>(&mut self, v: V) -> Result<(), AccessError>
Value
as an Array
.
Will return an AccessError::NotAnArray
if called
on a Value
that isn’t an Array
- otherwise will
behave the same as Vec::push
Read moreSource§impl<T> MutableObject for T
impl<T> MutableObject for T
Source§type Target = <<T as ValueAsMutObject>::Object as ObjectMut>::Element
type Target = <<T as ValueAsMutObject>::Object as ObjectMut>::Element
Source§type Object = <T as ValueAsMutObject>::Object
type Object = <T as ValueAsMutObject>::Object
Source§fn insert<K, V>(
&mut self,
k: K,
v: V,
) -> Result<Option<<T as MutableObject>::Target>, AccessError>
fn insert<K, V>( &mut self, k: K, v: V, ) -> Result<Option<<T as MutableObject>::Target>, AccessError>
Value
as an Object
.
Will return an AccessError::NotAnObject
if called
on a Value
that isn’t an object - otherwise will
behave the same as HashMap::insert
Read moreSource§fn remove<Q>(
&mut self,
k: &Q,
) -> Result<Option<<T as MutableObject>::Target>, AccessError>
fn remove<Q>( &mut self, k: &Q, ) -> Result<Option<<T as MutableObject>::Target>, AccessError>
Value
as an Object
.
Will return an AccessError::NotAnObject
if called
on a Value
that isn’t an object - otherwise will
behave the same as HashMap::remove
Read moreSource§fn get_mut<Q>(&mut self, k: &Q) -> Option<&mut <T as MutableObject>::Target>
fn get_mut<Q>(&mut self, k: &Q) -> Option<&mut <T as MutableObject>::Target>
get
but returns a mutable ref insteadSource§fn try_insert<K, V>(&mut self, k: K, v: V) -> Option<Self::Target>
fn try_insert<K, V>(&mut self, k: K, v: V) -> Option<Self::Target>
Value
as an Object
.
If the Value
isn’t an object this opoeration will
return None
and have no effect.Source§impl<T> TypedArrayValue for Twhere
T: ValueAsArray,
impl<T> TypedArrayValue for Twhere
T: ValueAsArray,
Source§impl<T> TypedObjectValue for Twhere
T: ValueAsObject,
impl<T> TypedObjectValue for Twhere
T: ValueAsObject,
Source§impl<T> TypedScalarValue for Twhere
T: ValueAsScalar,
impl<T> TypedScalarValue for Twhere
T: ValueAsScalar,
Source§fn is_integer(&self) -> bool
fn is_integer(&self) -> bool
Source§fn is_f64_castable(&self) -> bool
fn is_f64_castable(&self) -> bool
Source§impl<T> ValueArrayTryAccess for T
impl<T> ValueArrayTryAccess for T
Source§fn try_get_idx(
&self,
i: usize,
) -> Result<Option<&<T as ValueArrayTryAccess>::Target>, TryTypeError>
fn try_get_idx( &self, i: usize, ) -> Result<Option<&<T as ValueArrayTryAccess>::Target>, TryTypeError>
Tries to get a value based on n index, returns a type error if the
current value isn’t an Array, returns None
if the index is out of bounds
§Errors
if the requested type doesn’t match the actual type or the value is not an object
Source§impl<T> ValueObjectAccess for Twhere
T: ValueAsObject,
impl<T> ValueObjectAccess for Twhere
T: ValueAsObject,
Source§impl<T> ValueObjectAccessAsArray for T
impl<T> ValueObjectAccessAsArray for T
Source§type Key = <T as ValueObjectAccess>::Key
type Key = <T as ValueObjectAccess>::Key
Source§type Array = <<T as ValueObjectAccess>::Target as ValueAsArray>::Array
type Array = <<T as ValueObjectAccess>::Target as ValueAsArray>::Array
Source§impl<T> ValueObjectAccessAsObject for T
impl<T> ValueObjectAccessAsObject for T
Source§type Key = <T as ValueObjectAccess>::Key
type Key = <T as ValueObjectAccess>::Key
Source§type Object = <<T as ValueObjectAccess>::Target as ValueAsObject>::Object
type Object = <<T as ValueObjectAccess>::Target as ValueAsObject>::Object
Source§fn get_object<Q>(
&self,
k: &Q,
) -> Option<&<T as ValueObjectAccessAsObject>::Object>
fn get_object<Q>( &self, k: &Q, ) -> Option<&<T as ValueObjectAccessAsObject>::Object>
Source§impl<T> ValueObjectAccessAsScalar for T
impl<T> ValueObjectAccessAsScalar for T
Source§type Key = <T as ValueObjectAccess>::Key
type Key = <T as ValueObjectAccess>::Key
Source§fn get_usize<Q>(&self, k: &Q) -> Option<usize>
fn get_usize<Q>(&self, k: &Q) -> Option<usize>
Source§impl<T> ValueObjectAccessTryAsArray for T
impl<T> ValueObjectAccessTryAsArray for T
Source§type Key = <T as ValueObjectTryAccess>::Key
type Key = <T as ValueObjectTryAccess>::Key
Source§type Array = <<T as ValueObjectTryAccess>::Target as ValueTryAsArray>::Array
type Array = <<T as ValueObjectTryAccess>::Target as ValueTryAsArray>::Array
Source§fn try_get_array<Q>(
&self,
k: &Q,
) -> Result<Option<&<T as ValueObjectAccessTryAsArray>::Array>, TryTypeError>
fn try_get_array<Q>( &self, k: &Q, ) -> Result<Option<&<T as ValueObjectAccessTryAsArray>::Array>, TryTypeError>
Source§impl<T> ValueObjectAccessTryAsObject for T
impl<T> ValueObjectAccessTryAsObject for T
Source§type Key = <T as ValueObjectTryAccess>::Key
type Key = <T as ValueObjectTryAccess>::Key
Source§type Object = <<T as ValueObjectTryAccess>::Target as ValueTryAsObject>::Object
type Object = <<T as ValueObjectTryAccess>::Target as ValueTryAsObject>::Object
Source§fn try_get_object<Q>(
&self,
k: &Q,
) -> Result<Option<&<T as ValueObjectAccessTryAsObject>::Object>, TryTypeError>
fn try_get_object<Q>( &self, k: &Q, ) -> Result<Option<&<T as ValueObjectAccessTryAsObject>::Object>, TryTypeError>
Source§impl<T> ValueObjectAccessTryAsScalar for T
impl<T> ValueObjectAccessTryAsScalar for T
Source§type Key = <T as ValueObjectTryAccess>::Key
type Key = <T as ValueObjectTryAccess>::Key
Source§fn try_get_bool<Q>(&self, k: &Q) -> Result<Option<bool>, TryTypeError>
fn try_get_bool<Q>(&self, k: &Q) -> Result<Option<bool>, TryTypeError>
Source§fn try_get_i128<Q>(&self, k: &Q) -> Result<Option<i128>, TryTypeError>
fn try_get_i128<Q>(&self, k: &Q) -> Result<Option<i128>, TryTypeError>
Source§fn try_get_i64<Q>(&self, k: &Q) -> Result<Option<i64>, TryTypeError>
fn try_get_i64<Q>(&self, k: &Q) -> Result<Option<i64>, TryTypeError>
Source§fn try_get_i32<Q>(&self, k: &Q) -> Result<Option<i32>, TryTypeError>
fn try_get_i32<Q>(&self, k: &Q) -> Result<Option<i32>, TryTypeError>
Source§fn try_get_i16<Q>(&self, k: &Q) -> Result<Option<i16>, TryTypeError>
fn try_get_i16<Q>(&self, k: &Q) -> Result<Option<i16>, TryTypeError>
Source§fn try_get_i8<Q>(&self, k: &Q) -> Result<Option<i8>, TryTypeError>
fn try_get_i8<Q>(&self, k: &Q) -> Result<Option<i8>, TryTypeError>
Source§fn try_get_u128<Q>(&self, k: &Q) -> Result<Option<u128>, TryTypeError>
fn try_get_u128<Q>(&self, k: &Q) -> Result<Option<u128>, TryTypeError>
Source§fn try_get_u64<Q>(&self, k: &Q) -> Result<Option<u64>, TryTypeError>
fn try_get_u64<Q>(&self, k: &Q) -> Result<Option<u64>, TryTypeError>
Source§fn try_get_usize<Q>(&self, k: &Q) -> Result<Option<usize>, TryTypeError>
fn try_get_usize<Q>(&self, k: &Q) -> Result<Option<usize>, TryTypeError>
Source§fn try_get_u32<Q>(&self, k: &Q) -> Result<Option<u32>, TryTypeError>
fn try_get_u32<Q>(&self, k: &Q) -> Result<Option<u32>, TryTypeError>
Source§fn try_get_u16<Q>(&self, k: &Q) -> Result<Option<u16>, TryTypeError>
fn try_get_u16<Q>(&self, k: &Q) -> Result<Option<u16>, TryTypeError>
Source§fn try_get_u8<Q>(&self, k: &Q) -> Result<Option<u8>, TryTypeError>
fn try_get_u8<Q>(&self, k: &Q) -> Result<Option<u8>, TryTypeError>
Source§fn try_get_f64<Q>(&self, k: &Q) -> Result<Option<f64>, TryTypeError>
fn try_get_f64<Q>(&self, k: &Q) -> Result<Option<f64>, TryTypeError>
Source§fn try_get_f32<Q>(&self, k: &Q) -> Result<Option<f32>, TryTypeError>
fn try_get_f32<Q>(&self, k: &Q) -> Result<Option<f32>, TryTypeError>
Source§impl<T> ValueObjectTryAccess for Twhere
T: ValueTryAsObject,
impl<T> ValueObjectTryAccess for Twhere
T: ValueTryAsObject,
Source§type Target = <<T as ValueTryAsObject>::Object as Object>::Element
type Target = <<T as ValueTryAsObject>::Object as Object>::Element
Source§fn try_get<Q>(
&self,
k: &Q,
) -> Result<Option<&<T as ValueObjectTryAccess>::Target>, TryTypeError>
fn try_get<Q>( &self, k: &Q, ) -> Result<Option<&<T as ValueObjectTryAccess>::Target>, TryTypeError>
TryTypeError
if the
current Value isn’t an Object, returns None
if the key isn’t in the object Read moreSource§impl<T> ValueTryAsArray for Twhere
T: ValueAsArray + TypedValue,
impl<T> ValueTryAsArray for Twhere
T: ValueAsArray + TypedValue,
Source§type Array = <T as ValueAsArray>::Array
type Array = <T as ValueAsArray>::Array
Source§fn try_as_array(&self) -> Result<&<T as ValueTryAsArray>::Array, TryTypeError>
fn try_as_array(&self) -> Result<&<T as ValueTryAsArray>::Array, TryTypeError>
Source§impl<T> ValueTryAsArrayMut for T
impl<T> ValueTryAsArrayMut for T
Source§type Array = <T as ValueAsMutArray>::Array
type Array = <T as ValueAsMutArray>::Array
Source§fn try_as_array_mut(
&mut self,
) -> Result<&mut <T as ValueTryAsArrayMut>::Array, TryTypeError>
fn try_as_array_mut( &mut self, ) -> Result<&mut <T as ValueTryAsArrayMut>::Array, TryTypeError>
Source§impl<T> ValueTryAsMutObject for Twhere
T: ValueAsMutObject + TypedValue,
impl<T> ValueTryAsMutObject for Twhere
T: ValueAsMutObject + TypedValue,
Source§type Object = <T as ValueAsMutObject>::Object
type Object = <T as ValueAsMutObject>::Object
Source§fn try_as_object_mut(
&mut self,
) -> Result<&mut <T as ValueTryAsMutObject>::Object, TryTypeError>
fn try_as_object_mut( &mut self, ) -> Result<&mut <T as ValueTryAsMutObject>::Object, TryTypeError>
Source§impl<T> ValueTryAsObject for Twhere
T: ValueAsObject + TypedValue,
impl<T> ValueTryAsObject for Twhere
T: ValueAsObject + TypedValue,
Source§type Object = <T as ValueAsObject>::Object
type Object = <T as ValueAsObject>::Object
Source§fn try_as_object(
&self,
) -> Result<&<T as ValueTryAsObject>::Object, TryTypeError>
fn try_as_object( &self, ) -> Result<&<T as ValueTryAsObject>::Object, TryTypeError>
Source§impl<T> ValueTryAsScalar for Twhere
T: ValueAsScalar + TypedValue,
impl<T> ValueTryAsScalar for Twhere
T: ValueAsScalar + TypedValue,
Source§fn try_as_bool(&self) -> Result<bool, TryTypeError>
fn try_as_bool(&self) -> Result<bool, TryTypeError>
Source§fn try_as_i128(&self) -> Result<i128, TryTypeError>
fn try_as_i128(&self) -> Result<i128, TryTypeError>
Source§fn try_as_i64(&self) -> Result<i64, TryTypeError>
fn try_as_i64(&self) -> Result<i64, TryTypeError>
Source§fn try_as_i32(&self) -> Result<i32, TryTypeError>
fn try_as_i32(&self) -> Result<i32, TryTypeError>
Source§fn try_as_i16(&self) -> Result<i16, TryTypeError>
fn try_as_i16(&self) -> Result<i16, TryTypeError>
Source§fn try_as_i8(&self) -> Result<i8, TryTypeError>
fn try_as_i8(&self) -> Result<i8, TryTypeError>
Source§fn try_as_u128(&self) -> Result<u128, TryTypeError>
fn try_as_u128(&self) -> Result<u128, TryTypeError>
Source§fn try_as_u64(&self) -> Result<u64, TryTypeError>
fn try_as_u64(&self) -> Result<u64, TryTypeError>
Source§fn try_as_usize(&self) -> Result<usize, TryTypeError>
fn try_as_usize(&self) -> Result<usize, TryTypeError>
Source§fn try_as_u32(&self) -> Result<u32, TryTypeError>
fn try_as_u32(&self) -> Result<u32, TryTypeError>
Source§fn try_as_u16(&self) -> Result<u16, TryTypeError>
fn try_as_u16(&self) -> Result<u16, TryTypeError>
Source§fn try_as_u8(&self) -> Result<u8, TryTypeError>
fn try_as_u8(&self) -> Result<u8, TryTypeError>
Source§fn try_as_f64(&self) -> Result<f64, TryTypeError>
fn try_as_f64(&self) -> Result<f64, TryTypeError>
Source§fn try_cast_f64(&self) -> Result<f64, TryTypeError>
fn try_cast_f64(&self) -> Result<f64, TryTypeError>
Source§fn try_as_f32(&self) -> Result<f32, TryTypeError>
fn try_as_f32(&self) -> Result<f32, TryTypeError>
Source§fn try_as_str(&self) -> Result<&str, TryTypeError>
fn try_as_str(&self) -> Result<&str, TryTypeError>
Source§fn try_as_char(&self) -> Result<char, TryTypeError>
fn try_as_char(&self) -> Result<char, TryTypeError>
Source§impl<T> ValueTryIntoArray for Twhere
T: ValueIntoArray + TypedValue,
impl<T> ValueTryIntoArray for Twhere
T: ValueIntoArray + TypedValue,
Source§fn try_into_array(self) -> Result<<T as ValueTryIntoArray>::Array, TryTypeError>
fn try_into_array(self) -> Result<<T as ValueTryIntoArray>::Array, TryTypeError>
Tries to turn the value into it’s array representation
§Errors
if the requested type doesn’t match the actual type
Source§type Array = <T as ValueIntoArray>::Array
type Array = <T as ValueIntoArray>::Array
Source§impl<T> ValueTryIntoObject for Twhere
T: ValueIntoObject + TypedValue,
impl<T> ValueTryIntoObject for Twhere
T: ValueIntoObject + TypedValue,
Source§fn try_into_object(
self,
) -> Result<<T as ValueTryIntoObject>::Object, TryTypeError>
fn try_into_object( self, ) -> Result<<T as ValueTryIntoObject>::Object, TryTypeError>
Tries to turn the value into it’s object representation
§Errors
if the requested type doesn’t match the actual type