Struct serde_bencode::de::BencodeAccess
[−]
[src]
pub struct BencodeAccess<'a, R: 'a + Read> { /* fields omitted */ }
Trait Implementations
impl<'de, 'a, R: 'a + Read> SeqAccess<'de> for BencodeAccess<'a, R>
[src]
type Error = Error
The error type that can be returned if some error occurs during deserialization. Read more
fn next_element_seed<T: DeserializeSeed<'de>>(
&mut self,
seed: T
) -> Result<Option<T::Value>>
&mut self,
seed: T
) -> Result<Option<T::Value>>
This returns Ok(Some(value))
for the next value in the sequence, or Ok(None)
if there are no more remaining items. Read more
fn next_element<T>(&mut self) -> Result<Option<T>, Self::Error> where
T: Deserialize<'de>,
T: Deserialize<'de>,
This returns Ok(Some(value))
for the next value in the sequence, or Ok(None)
if there are no more remaining items. Read more
fn size_hint(&self) -> Option<usize>
Returns the number of elements remaining in the sequence, if known.
impl<'de, 'a, R: 'a + Read> MapAccess<'de> for BencodeAccess<'a, R>
[src]
type Error = 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>> where
K: DeserializeSeed<'de>,
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> where
V: DeserializeSeed<'de>,
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
K: DeserializeSeed<'de>,
V: DeserializeSeed<'de>,
&mut self,
kseed: K,
vseed: V
) -> Result<Option<(<K as DeserializeSeed<'de>>::Value, <V as DeserializeSeed<'de>>::Value)>, Self::Error> where
K: DeserializeSeed<'de>,
V: 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
fn next_key<K>(&mut self) -> Result<Option<K>, Self::Error> where
K: Deserialize<'de>,
K: Deserialize<'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<V>(&mut self) -> Result<V, Self::Error> where
V: Deserialize<'de>,
V: Deserialize<'de>,
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
K: Deserialize<'de>,
V: Deserialize<'de>,
K: Deserialize<'de>,
V: 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
fn size_hint(&self) -> Option<usize>
Returns the number of entries remaining in the map, if known.
impl<'de, 'a, R: 'a + Read> VariantAccess<'de> for BencodeAccess<'a, R>
[src]
type Error = Error
The error type that can be returned if some error occurs during deserialization. Must match the error type of our EnumAccess
. Read more
fn unit_variant(self) -> Result<()>
Called when deserializing a variant with no values. Read more
fn newtype_variant_seed<T: DeserializeSeed<'de>>(
self,
seed: T
) -> Result<T::Value>
self,
seed: T
) -> Result<T::Value>
Called when deserializing a variant with a single value. Read more
fn tuple_variant<V: Visitor<'de>>(
self,
len: usize,
visitor: V
) -> Result<V::Value>
self,
len: usize,
visitor: V
) -> Result<V::Value>
Called when deserializing a tuple-like variant. Read more
fn struct_variant<V: Visitor<'de>>(
self,
_: &'static [&'static str],
visitor: V
) -> Result<V::Value>
self,
_: &'static [&'static str],
visitor: V
) -> Result<V::Value>
Called when deserializing a struct-like variant. Read more
fn newtype_variant<T>(self) -> Result<T, Self::Error> where
T: Deserialize<'de>,
T: Deserialize<'de>,
Called when deserializing a variant with a single value. Read more
impl<'de, 'a, R: 'a + Read> EnumAccess<'de> for BencodeAccess<'a, R>
[src]
type Error = Error
The error type that can be returned if some error occurs during deserialization. Read more
type Variant = Self
The Visitor
that will be used to deserialize the content of the enum variant. Read more
fn variant_seed<V: DeserializeSeed<'de>>(
self,
seed: V
) -> Result<(V::Value, Self)>
self,
seed: V
) -> Result<(V::Value, Self)>
variant
is called to identify which variant to deserialize. Read more
fn variant<V>(self) -> Result<(V, Self::Variant), Self::Error> where
V: Deserialize<'de>,
V: Deserialize<'de>,
variant
is called to identify which variant to deserialize. Read more