[−][src]Struct rmp_serde::decode::VariantAccess
Default variant visitor.
Note
We use default behaviour for new type, which decodes enums with a single value as a tuple.
Methods
impl<'a, R: 'a> VariantAccess<'a, R>[src]
impl<'a, R: 'a> VariantAccess<'a, R>pub fn new(de: &'a mut Deserializer<R>) -> Self[src]
pub fn new(de: &'a mut Deserializer<R>) -> SelfTrait Implementations
impl<'de, 'a, R: Read<'de>> EnumAccess<'de> for VariantAccess<'a, R>[src]
impl<'de, 'a, R: Read<'de>> EnumAccess<'de> for VariantAccess<'a, R>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>(self, seed: V) -> Result<(V::Value, Self), Error> where
V: DeserializeSeed<'de>, [src]
fn variant_seed<V>(self, seed: V) -> Result<(V::Value, Self), Error> where
V: DeserializeSeed<'de>, 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>, [src]
fn variant<V>(self) -> Result<(V, Self::Variant), Self::Error> where
V: Deserialize<'de>, variant is called to identify which variant to deserialize. Read more
impl<'de, 'a, R: Read<'de>> VariantAccess<'de> for VariantAccess<'a, R>[src]
impl<'de, 'a, R: Read<'de>> VariantAccess<'de> for VariantAccess<'a, R>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<(), Error>[src]
fn unit_variant(self) -> Result<(), Error>Called when deserializing a variant with no values. Read more
fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value, Self::Error> where
T: DeserializeSeed<'de>, [src]
fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value, Self::Error> where
T: DeserializeSeed<'de>, Called when deserializing a variant with a single value. Read more
fn tuple_variant<V>(self, len: usize, visitor: V) -> Result<V::Value, Error> where
V: Visitor<'de>, [src]
fn tuple_variant<V>(self, len: usize, visitor: V) -> Result<V::Value, Error> where
V: Visitor<'de>, Called when deserializing a tuple-like variant. Read more
fn struct_variant<V>(
self,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Error> where
V: Visitor<'de>, [src]
fn struct_variant<V>(
self,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Error> where
V: Visitor<'de>, Called when deserializing a struct-like variant. Read more
fn newtype_variant<T>(self) -> Result<T, Self::Error> where
T: Deserialize<'de>, [src]
fn newtype_variant<T>(self) -> Result<T, Self::Error> where
T: Deserialize<'de>, Called when deserializing a variant with a single value. Read more
Auto Trait Implementations
impl<'a, R> Send for VariantAccess<'a, R> where
R: Send,
impl<'a, R> Send for VariantAccess<'a, R> where
R: Send, impl<'a, R> Sync for VariantAccess<'a, R> where
R: Sync,
impl<'a, R> Sync for VariantAccess<'a, R> where
R: Sync, Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more
impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>,