Struct gix_features::progress::Write
source · pub struct Write<T, P> {
pub inner: T,
pub progress: P,
}Available on crate feature
progress only.Expand description
A structure passing every write call through to the contained Progress instance using inc_by(bytes_written).
This is particularly useful if the final size of the bytes to write is known or can be estimated precisely enough.
Fields§
§inner: TThe implementor of std::io::Write to which progress is added
progress: PThe progress instance receiving progress information on each invocation of reader
Trait Implementations§
source§impl<T, P> Write for Write<T, P>where
T: Write,
P: Progress,
impl<T, P> Write for Write<T, P>where T: Write, P: Progress,
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<T, P> RefUnwindSafe for Write<T, P>where P: RefUnwindSafe, T: RefUnwindSafe,
impl<T, P> Send for Write<T, P>where P: Send, T: Send,
impl<T, P> Sync for Write<T, P>where P: Sync, T: Sync,
impl<T, P> Unpin for Write<T, P>where P: Unpin, T: Unpin,
impl<T, P> UnwindSafe for Write<T, P>where P: UnwindSafe, 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