Struct object::write::StreamingBuffer
source · pub struct StreamingBuffer<W> { /* private fields */ }
Expand description
A WritableBuffer
that streams data to a Write
implementation.
Self::result
must be called to determine if an I/O error occurred during writing.
It is advisable to use a buffered writer like BufWriter
instead of an unbuffered writer like File
.
Implementations§
source§impl<W> StreamingBuffer<W>
impl<W> StreamingBuffer<W>
sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Unwraps this StreamingBuffer
giving back the original writer.
Trait Implementations§
source§impl<W: Debug> Debug for StreamingBuffer<W>
impl<W: Debug> Debug for StreamingBuffer<W>
source§impl<W: Write> WritableBuffer for StreamingBuffer<W>
impl<W: Write> WritableBuffer for StreamingBuffer<W>
source§fn reserve(&mut self, _size: usize) -> Result<(), ()>
fn reserve(&mut self, _size: usize) -> Result<(), ()>
Reserves specified number of bytes in the buffer. Read more
source§fn resize(&mut self, new_len: usize)
fn resize(&mut self, new_len: usize)
Writes zero bytes at the end of the buffer until the buffer
has the specified length.
source§fn write_bytes(&mut self, val: &[u8])
fn write_bytes(&mut self, val: &[u8])
Writes the specified slice of bytes at the end of the buffer.
Auto Trait Implementations§
impl<W> Freeze for StreamingBuffer<W>where
W: Freeze,
impl<W> !RefUnwindSafe for StreamingBuffer<W>
impl<W> Send for StreamingBuffer<W>where
W: Send,
impl<W> Sync for StreamingBuffer<W>where
W: Sync,
impl<W> Unpin for StreamingBuffer<W>where
W: Unpin,
impl<W> !UnwindSafe for StreamingBuffer<W>
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