[−][src]Struct postcard::Deserializer
A structure for deserializing a postcard message. For now, Deserializer does not implement the same Flavor interface as the serializer does, as messages are typically easier to deserialize in place. This may change in the future for consistency, or to support items that cannot be deserialized in-place, such as compressed message types
Methods
impl<'de> Deserializer<'de>
[src]
pub fn from_bytes(input: &'de [u8]) -> Self
[src]
Obtain a Deserializer from a slice of bytes
Trait Implementations
impl<'de, 'a> Deserializer<'de> for &'a mut Deserializer<'de>
[src]
type Error = Error
The error type that can be returned if some error occurs during deserialization. Read more
fn deserialize_any<V>(self, _visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_char<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_str<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_string<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_option<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_unit_struct<V>(
self,
_name: &'static str,
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
[src]
self,
_name: &'static str,
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
fn deserialize_newtype_struct<V>(
self,
_name: &'static str,
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
[src]
self,
_name: &'static str,
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_tuple<V>(self, len: usize, visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_tuple_struct<V>(
self,
_name: &'static str,
_len: usize,
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
[src]
self,
_name: &'static str,
_len: usize,
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
fn deserialize_map<V>(self, _visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_struct<V>(
self,
_name: &'static str,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
[src]
self,
_name: &'static str,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
fn deserialize_enum<V>(
self,
_name: &'static str,
_variants: &'static [&'static str],
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
[src]
self,
_name: &'static str,
_variants: &'static [&'static str],
visitor: V
) -> Result<V::Value> where
V: Visitor<'de>,
fn deserialize_identifier<V>(self, _visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_ignored_any<V>(self, _visitor: V) -> Result<V::Value> where
V: Visitor<'de>,
[src]
V: Visitor<'de>,
fn deserialize_i128<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error> where
V: Visitor<'de>,
[src]
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error> where
V: Visitor<'de>,
fn deserialize_u128<V>(
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error> where
V: Visitor<'de>,
[src]
self,
visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error> where
V: Visitor<'de>,
fn is_human_readable(&self) -> bool
[src]
impl<'de, 'a> VariantAccess<'de> for &'a mut Deserializer<'de>
[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<()>
[src]
fn newtype_variant_seed<V: DeserializeSeed<'de>>(
self,
seed: V
) -> Result<V::Value>
[src]
self,
seed: V
) -> Result<V::Value>
fn tuple_variant<V: Visitor<'de>>(
self,
len: usize,
visitor: V
) -> Result<V::Value>
[src]
self,
len: usize,
visitor: V
) -> Result<V::Value>
fn struct_variant<V: Visitor<'de>>(
self,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value>
[src]
self,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value>
fn newtype_variant<T>(self) -> Result<T, Self::Error> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<'de, 'a> EnumAccess<'de> for &'a mut Deserializer<'de>
[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)>
[src]
self,
seed: V
) -> Result<(V::Value, Self)>
fn variant<V>(self) -> Result<(V, Self::Variant), Self::Error> where
V: Deserialize<'de>,
[src]
V: Deserialize<'de>,
Auto Trait Implementations
impl<'de> Send for Deserializer<'de>
impl<'de> Sync for Deserializer<'de>
impl<'de> Unpin for Deserializer<'de>
impl<'de> UnwindSafe for Deserializer<'de>
impl<'de> RefUnwindSafe for Deserializer<'de>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self