[][src]Struct rmp_serde::decode::Deserializer

pub struct Deserializer<R> { /* fields omitted */ }

A Deserializer that reads bytes from a buffer.

Note

All instances of ErrorKind::Interrupted are handled by this function and the underlying operation is retried.

Methods

impl<R: Read> Deserializer<ReadReader<R>>[src]

pub fn new(rd: R) -> Self[src]

Constructs a new Deserializer by consuming the given reader.

pub fn get_ref(&self) -> &R[src]

Gets a reference to the underlying reader in this decoder.

pub fn get_mut(&mut self) -> &mut R[src]

Gets a mutable reference to the underlying reader in this decoder.

pub fn into_inner(self) -> R[src]

Consumes this deserializer returning the underlying reader.

impl<R: AsRef<[u8]>> Deserializer<ReadReader<Cursor<R>>>[src]

pub fn position(&self) -> u64[src]

Returns the current position of this deserializer, i.e. how many bytes were read.

impl<'de, R: ?Sized> Deserializer<ReadRefReader<'de, R>> where
    R: AsRef<[u8]>, 
[src]

pub fn from_read_ref(rd: &'de R) -> Self[src]

Constructs a new Deserializer from the given byte slice.

pub fn get_ref(&self) -> &R[src]

Gets a reference to the underlying reader in this decoder.

impl<'de, R: ReadSlice<'de>> Deserializer<R>[src]

pub fn set_max_depth(&mut self, depth: usize)[src]

Changes the maximum nesting depth that is allowed

Trait Implementations

impl<R: Debug> Debug for Deserializer<R>[src]

impl<'de, 'a, R: ReadSlice<'de>> Deserializer<'de> for &'a mut Deserializer<R>[src]

type Error = Error

The error type that can be returned if some error occurs during deserialization. Read more

fn deserialize_i128<V>(
    self,
    visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error> where
    V: Visitor<'de>, 
[src]

Hint that the Deserialize type is expecting an i128 value. Read more

fn deserialize_u128<V>(
    self,
    visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error> where
    V: Visitor<'de>, 
[src]

Hint that the Deserialize type is expecting an u128 value. Read more

fn is_human_readable(&self) -> bool[src]

Determine whether Deserialize implementations should expect to deserialize their human-readable form. Read more

Auto Trait Implementations

impl<R> Send for Deserializer<R> where
    R: Send

impl<R> Unpin for Deserializer<R> where
    R: Unpin

impl<R> Sync for Deserializer<R> where
    R: Sync

impl<R> RefUnwindSafe for Deserializer<R> where
    R: RefUnwindSafe

impl<R> UnwindSafe for Deserializer<R> where
    R: UnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]