Struct git_repository::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: T
The implementor of std::io::Write
to which progress is added
progress: P
The progress instance receiving progress information on each invocation of reader
Trait Implementations
sourceimpl<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,
sourcefn write(&mut self, buf: &[u8]) -> Result<usize, Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
Write a buffer into this writer, returning how many bytes were written. Read more
sourcefn flush(&mut self) -> Result<(), Error>
fn flush(&mut self) -> Result<(), Error>
Flush this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
sourcefn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · sourcefn 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
sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more