Struct bczhc_lib::io::duplicator::StreamDuplicator
source · pub struct StreamDuplicator<'a, W1, W2>where
W1: Write,
W2: Write,{ /* private fields */ }Implementations§
source§impl<'a, W1, W2> StreamDuplicator<'a, W1, W2>where
W1: Write,
W2: Write,
impl<'a, W1, W2> StreamDuplicator<'a, W1, W2>where W1: Write, W2: Write,
pub fn new( writer1: &'a mut W1, writer2: &'a mut W2 ) -> StreamDuplicator<'a, W1, W2> ⓘ
Trait Implementations§
source§impl<'a, W1, W2> Write for StreamDuplicator<'a, W1, W2>where
W1: Write,
W2: Write,
impl<'a, W1, W2> Write for StreamDuplicator<'a, W1, W2>where W1: Write, W2: Write,
source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector)1.0.0 · source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations§
impl<'a, W1, W2> RefUnwindSafe for StreamDuplicator<'a, W1, W2>where W1: RefUnwindSafe, W2: RefUnwindSafe,
impl<'a, W1, W2> Send for StreamDuplicator<'a, W1, W2>where W1: Send, W2: Send,
impl<'a, W1, W2> Sync for StreamDuplicator<'a, W1, W2>where W1: Sync, W2: Sync,
impl<'a, W1, W2> Unpin for StreamDuplicator<'a, W1, W2>
impl<'a, W1, W2> !UnwindSafe for StreamDuplicator<'a, W1, W2>
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where F: FnOnce(&Self) -> bool,
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more