[][src]Struct tees::TeeReader

pub struct TeeReader<R: Read, W: Write> { /* fields omitted */ }

An adapter for readers whose inputs are written to a "tee"'d writer


impl<R: Read, W: Write> TeeReader<R, W>[src]

pub fn new(reader: R, writer: W) -> TeeReader<R, W>

Notable traits for TeeReader<R, W>

impl<R: Read, W: Write> Read for TeeReader<R, W>

Returns a TeeReader which can be used as Read whose reads delegate bytes read to the provided reader and write to the provided writer. The write operation must complete before the read completes.

Errors reported by the write operation will be interpreted as errors for the read

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

Consumes the TeeReader, returning the wrapped reader and writer.

Trait Implementations

impl<R: Read, W: Write> Read for TeeReader<R, W>[src]

impl<R: Read + Seek, W: Write + Seek> Seek for TeeReader<R, W>[src]

Auto Trait Implementations

impl<R, W> RefUnwindSafe for TeeReader<R, W> where
    R: RefUnwindSafe,
    W: RefUnwindSafe

impl<R, W> Send for TeeReader<R, W> where
    R: Send,
    W: Send

impl<R, W> Sync for TeeReader<R, W> where
    R: Sync,
    W: Sync

impl<R, W> Unpin for TeeReader<R, W> where
    R: Unpin,
    W: Unpin

impl<R, W> UnwindSafe for TeeReader<R, W> where
    R: UnwindSafe,
    W: UnwindSafe

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.