pub struct Tee<W1: ErrorType, W2, E> { /* private fields */ }Expand description
A “T” shaped dispatcher for blocking writes. This contains two writers, both of which writes to the Tee are sent to.
On errors, the writers may have received different amounts of data. Errors are propagated from either writer. Both writers’ error types need to be convertible into a common error.
Implementations§
Trait Implementations§
Source§impl<W1, W2, E> Write for Tee<W1, W2, E>
impl<W1, W2, E> Write for Tee<W1, W2, E>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<(), Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
Flush this output stream, blocking until all intermediately buffered contents reach their destination.
Auto Trait Implementations§
impl<W1, W2, E> Freeze for Tee<W1, W2, E>
impl<W1, W2, E> RefUnwindSafe for Tee<W1, W2, E>
impl<W1, W2, E> Send for Tee<W1, W2, E>
impl<W1, W2, E> Sync for Tee<W1, W2, E>
impl<W1, W2, E> Unpin for Tee<W1, W2, E>
impl<W1, W2, E> UnwindSafe for Tee<W1, W2, E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more