[][src]Struct framed::typed::Receiver

pub struct Receiver<R: Read, T: DeserializeOwned + Serialize> { /* fields omitted */ }

Receives encoded structs of type T from an inner std::io::Read instance.

Construct an instance using the method Config::to_receiver

Examples

See the std usage example in the typed module documentation.

Methods

impl<R: Read, T: DeserializeOwned + Serialize> Receiver<R, T>[src]

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

Consume this Receiver and return the inner std::io::Read.

pub fn recv(&mut self) -> Result<T>[src]

Receive an encoded frame from the inner std::io::Read, decode it and return the payload.

Auto Trait Implementations

impl<R, T> Send for Receiver<R, T> where
    R: Send,
    T: Send

impl<R, T> Sync for Receiver<R, T> where
    R: Sync,
    T: Sync

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.