[−][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.
Implementations
impl<'a, R: 'a> VariantAccess<'a, R>
[src]
pub fn new(de: &'a mut Deserializer<R>) -> Self
[src]
Trait Implementations
impl<'de, 'a, R: Read<'de>> EnumAccess<'de> for VariantAccess<'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>(self, seed: V) -> Result<(V::Value, Self), Error> where
V: DeserializeSeed<'de>,
[src]
V: DeserializeSeed<'de>,
fn variant<V>(self) -> Result<(V, Self::Variant), Self::Error> where
V: Deserialize<'de>,
[src]
V: Deserialize<'de>,
impl<'de, 'a, R: Read<'de>> VariantAccess<'de> for VariantAccess<'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<(), Error>
[src]
fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value, Self::Error> where
T: DeserializeSeed<'de>,
[src]
T: DeserializeSeed<'de>,
fn tuple_variant<V>(self, len: usize, visitor: V) -> Result<V::Value, Error> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn struct_variant<V>(
self,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Error> where
V: Visitor<'de>,
[src]
self,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Error> where
V: Visitor<'de>,
fn newtype_variant<T>(self) -> Result<T, Self::Error> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
Auto Trait Implementations
impl<'a, R> RefUnwindSafe for VariantAccess<'a, R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<'a, R> Send for VariantAccess<'a, R> where
R: Send,
R: Send,
impl<'a, R> Sync for VariantAccess<'a, R> where
R: Sync,
R: Sync,
impl<'a, R> Unpin for VariantAccess<'a, R>
impl<'a, R> !UnwindSafe for VariantAccess<'a, R>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,