pub struct FlushDropWrite<T: Write>(/* private fields */);Expand description
An implementation of Trait Write, which calls the flush() method on drop.
Implementations§
Trait Implementations§
Source§impl<T: Write> Drop for FlushDropWrite<T>
impl<T: Write> Drop for FlushDropWrite<T>
Source§impl<T: Write> From<T> for FlushDropWrite<T>
impl<T: Write> From<T> for FlushDropWrite<T>
Source§impl<T: Write> Write for FlushDropWrite<T>
impl<T: Write> Write for FlushDropWrite<T>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
Source§fn write_all(&mut self, buf: &[u8]) -> Result<()>
fn write_all(&mut self, buf: &[u8]) -> Result<()>
Attempts to write an entire buffer into this writer. Read more
Source§fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<()>
fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<()>
Writes a formatted string into this writer, returning any error
encountered. Read more
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector)Auto Trait Implementations§
impl<T> Freeze for FlushDropWrite<T>where
T: Freeze,
impl<T> RefUnwindSafe for FlushDropWrite<T>where
T: RefUnwindSafe,
impl<T> Send for FlushDropWrite<T>where
T: Send,
impl<T> Sync for FlushDropWrite<T>where
T: Sync,
impl<T> Unpin for FlushDropWrite<T>where
T: Unpin,
impl<T> UnwindSafe for FlushDropWrite<T>where
T: UnwindSafe,
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