pub struct SizeWriter {
pub bytes_written: usize,
}
Expand description
A writer that counts how many bytes were written. This is useful for e.g. pre-allocating buffers bfeore writing to them.
Fields§
§bytes_written: usize
the amount of bytes that were written so far
Trait Implementations§
Source§impl Default for SizeWriter
impl Default for SizeWriter
Source§fn default() -> SizeWriter
fn default() -> SizeWriter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SizeWriter
impl RefUnwindSafe for SizeWriter
impl Send for SizeWriter
impl Sync for SizeWriter
impl Unpin for SizeWriter
impl UnwindSafe for SizeWriter
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