Struct ruststep::ast::SingleMapDeserializer [−][src]
pub struct SingleMapDeserializer<T> { /* fields omitted */ }
Expand description
Deserializer corresponding to a single-key map like { "A": [1.0, 2.0] }
Implementations
Trait Implementations
impl<'de, T> EnumAccess<'de> for SingleMapDeserializer<T> where
T: IntoDeserializer<'de, Error>,
impl<'de, T> EnumAccess<'de> for SingleMapDeserializer<T> where
T: IntoDeserializer<'de, Error>,
The error type that can be returned if some error occurs during deserialization. Read more
type Variant = Self
type Variant = Self
The Visitor
that will be used to deserialize the content of the enum
variant. Read more
fn variant_seed<V>(
self,
seed: V
) -> Result<(V::Value, Self::Variant), Self::Error> where
V: DeserializeSeed<'de>,
fn variant_seed<V>(
self,
seed: V
) -> Result<(V::Value, Self::Variant), Self::Error> where
V: DeserializeSeed<'de>,
variant
is called to identify which variant to deserialize. Read more
impl<'de, T> MapAccess<'de> for SingleMapDeserializer<T> where
T: IntoDeserializer<'de, Error>,
impl<'de, T> MapAccess<'de> for SingleMapDeserializer<T> where
T: IntoDeserializer<'de, Error>,
The error type that can be returned if some error occurs during deserialization. Read more
fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Self::Error> where
K: DeserializeSeed<'de>,
fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Self::Error> where
K: DeserializeSeed<'de>,
This returns Ok(Some(key))
for the next key in the map, or Ok(None)
if there are no more remaining entries. Read more
fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value, Self::Error> where
V: DeserializeSeed<'de>,
fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value, Self::Error> where
V: DeserializeSeed<'de>,
This returns a Ok(value)
for the next value in the map. Read more
fn next_entry_seed<K, V>(
&mut self,
kseed: K,
vseed: V
) -> Result<Option<(<K as DeserializeSeed<'de>>::Value, <V as DeserializeSeed<'de>>::Value)>, Self::Error> where
V: DeserializeSeed<'de>,
K: DeserializeSeed<'de>,
fn next_entry_seed<K, V>(
&mut self,
kseed: K,
vseed: V
) -> Result<Option<(<K as DeserializeSeed<'de>>::Value, <V as DeserializeSeed<'de>>::Value)>, Self::Error> where
V: DeserializeSeed<'de>,
K: DeserializeSeed<'de>,
This returns Ok(Some((key, value)))
for the next (key-value) pair in
the map, or Ok(None)
if there are no more remaining items. Read more
This returns Ok(Some(key))
for the next key in the map, or Ok(None)
if there are no more remaining entries. Read more
This returns a Ok(value)
for the next value in the map. Read more
fn next_entry<K, V>(&mut self) -> Result<Option<(K, V)>, Self::Error> where
V: Deserialize<'de>,
K: Deserialize<'de>,
fn next_entry<K, V>(&mut self) -> Result<Option<(K, V)>, Self::Error> where
V: Deserialize<'de>,
K: Deserialize<'de>,
This returns Ok(Some((key, value)))
for the next (key-value) pair in
the map, or Ok(None)
if there are no more remaining items. Read more
impl<'de, T> VariantAccess<'de> for SingleMapDeserializer<T> where
T: IntoDeserializer<'de, Error>,
impl<'de, T> VariantAccess<'de> for SingleMapDeserializer<T> where
T: IntoDeserializer<'de, Error>,
The error type that can be returned if some error occurs during
deserialization. Must match the error type of our EnumAccess
. Read more
Called when deserializing a variant with no values. Read more
fn newtype_variant_seed<D>(self, seed: D) -> Result<D::Value, Self::Error> where
D: DeserializeSeed<'de>,
fn newtype_variant_seed<D>(self, seed: D) -> Result<D::Value, Self::Error> where
D: DeserializeSeed<'de>,
Called when deserializing a variant with a single value. Read more
Called when deserializing a tuple-like variant. Read more
fn struct_variant<V>(
self,
_fields: &'static [&'static str],
_visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
fn struct_variant<V>(
self,
_fields: &'static [&'static str],
_visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
Called when deserializing a struct-like variant. Read more
Called when deserializing a variant with a single value. Read more