Struct bincode::de::Deserializer[][src]

pub struct Deserializer<R, O: Options> { /* fields omitted */ }

A Deserializer that reads bytes from a buffer.

This struct should rarely be used. In most cases, prefer the deserialize_from function.

The ByteOrder that is chosen will impact the endianness that is used to read integers out of the reader.

let d = Deserializer::new(&mut some_reader, SizeLimit::new());
serde::Deserialize::deserialize(&mut deserializer);
let bytes_read = d.bytes_read();

Implementations

impl<'de, IR: Read, O: Options> Deserializer<IoReader<IR>, O>[src]

pub fn with_reader(r: IR, options: O) -> Self[src]

Creates a new Deserializer with a given Reader and options.

impl<'de, O: Options> Deserializer<SliceReader<'de>, O>[src]

pub fn from_slice(slice: &'de [u8], options: O) -> Self[src]

Creates a new Deserializer that will read from the given slice.

impl<'de, R: BincodeRead<'de>, O: Options> Deserializer<R, O>[src]

pub fn with_bincode_read(r: R, options: O) -> Deserializer<R, O>[src]

Creates a new Deserializer with the given BincodeReader

Trait Implementations

impl<'de, 'a, R, O> Deserializer<'de> for &'a mut Deserializer<R, O> where
    R: BincodeRead<'de>,
    O: Options
[src]

type Error = Error

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

impl<'de, 'a, R: 'a, O> EnumAccess<'de> for &'a mut Deserializer<R, O> where
    R: BincodeRead<'de>,
    O: Options
[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

impl<'de, 'a, R, O> VariantAccess<'de> for &'a mut Deserializer<R, O> where
    R: BincodeRead<'de>,
    O: Options
[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

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

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

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

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.