Struct async_read_util::ObservedReader[][src]

pub struct ObservedReader<R, F> { /* fields omitted */ }

An async reader which allows a closure to observe the bytes being read as they are ready. This has use cases such as hashing the output of a reader without interfering with the actual content.

Implementations

impl<R, F> ObservedReader<R, F> where
    R: AsyncRead,
    F: FnMut(&[u8]), 
[src]

pub fn new(inner: R, f: F) -> Self[src]

Trait Implementations

impl<R, F> AsyncRead for ObservedReader<R, F> where
    R: AsyncRead,
    F: FnMut(&[u8]), 
[src]

impl<'pin, R, F> Unpin for ObservedReader<R, F> where
    __ObservedReader<'pin, R, F>: Unpin
[src]

Auto Trait Implementations

impl<R, F> RefUnwindSafe for ObservedReader<R, F> where
    F: RefUnwindSafe,
    R: RefUnwindSafe

impl<R, F> Send for ObservedReader<R, F> where
    F: Send,
    R: Send

impl<R, F> Sync for ObservedReader<R, F> where
    F: Sync,
    R: Sync

impl<R, F> UnwindSafe for ObservedReader<R, F> where
    F: UnwindSafe,
    R: UnwindSafe

Blanket Implementations

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

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized

impl<R> AsyncReadUtil for R where
    R: AsyncRead, 
[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.