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
sourceimpl<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
sourceimpl<W: Debug> Debug for StreamingBuffer<W>
 
impl<W: Debug> Debug for StreamingBuffer<W>
sourceimpl<W: Write> WritableBuffer for StreamingBuffer<W>
 
impl<W: Write> WritableBuffer for StreamingBuffer<W>
sourcefn reserve(&mut self, _size: usize) -> Result<(), ()>
 
fn reserve(&mut self, _size: usize) -> Result<(), ()>
Reserves specified number of bytes in the buffer. Read more
sourcefn 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. Read more
sourcefn 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.
sourcefn write_pod<T: Pod>(&mut self, val: &T) where
    Self: Sized, 
 
fn write_pod<T: Pod>(&mut self, val: &T) where
    Self: Sized, 
Writes the specified Pod type at the end of the buffer.
sourcefn write_pod_slice<T: Pod>(&mut self, val: &[T]) where
    Self: Sized, 
 
fn write_pod_slice<T: Pod>(&mut self, val: &[T]) where
    Self: Sized, 
Writes the specified Pod slice at the end of the buffer.
Auto Trait Implementations
impl<W> RefUnwindSafe for StreamingBuffer<W> where
    W: RefUnwindSafe, 
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> where
    W: UnwindSafe, 
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
 
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more