Struct async_prost::AsyncProstReader[][src]

pub struct AsyncProstReader<R, T, D> { /* fields omitted */ }

A wrapper around an async reader that produces an asynchronous stream of prost-decoded values

Implementations

impl<R, T, D> AsyncProstReader<R, T, D>[src]

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

create a new reader

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

gets a reference to the underlying reader

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

gets a mutable reference to the underlying reader

pub fn buffer(&self) -> &[u8][src]

returns a reference to the internally buffered data

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

unwrap the AsyncProstReader, returning the underlying reader

Trait Implementations

impl<R: Debug, T: Debug, D: Debug> Debug for AsyncProstReader<R, T, D>[src]

impl<R, T, D> Default for AsyncProstReader<R, T, D> where
    R: Default
[src]

impl<R, T, D> From<R> for AsyncProstReader<R, T, D>[src]

impl<R, T> Stream for AsyncProstReader<R, T, AsyncDestination> where
    T: Message + Default,
    R: AsyncRead + Unpin
[src]

type Item = Result<T, Error>

Values yielded by the stream.

impl<R, T> Stream for AsyncProstReader<R, T, AsyncFrameDestination> where
    R: AsyncRead + Unpin,
    T: Framed + Default
[src]

type Item = Result<T, Error>

Values yielded by the stream.

impl<R, T, D> Unpin for AsyncProstReader<R, T, D> where
    R: Unpin
[src]

Auto Trait Implementations

impl<R, T, D> RefUnwindSafe for AsyncProstReader<R, T, D> where
    D: RefUnwindSafe,
    R: RefUnwindSafe,
    T: RefUnwindSafe

impl<R, T, D> Send for AsyncProstReader<R, T, D> where
    D: Send,
    R: Send,
    T: Send

impl<R, T, D> Sync for AsyncProstReader<R, T, D> where
    D: Sync,
    R: Sync,
    T: Sync

impl<R, T, D> UnwindSafe for AsyncProstReader<R, T, D> where
    D: UnwindSafe,
    R: UnwindSafe,
    T: 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<!> for T[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.

impl<S, T, E> TryStream for S where
    S: Stream<Item = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future