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.