Struct bytes::MutByteBuf [] [src]

pub struct MutByteBuf {
    // some fields omitted
}

Methods

impl MutByteBuf
[src]

fn capacity(&self) -> usize

fn flip(self) -> ByteBuf

fn clear(&mut self)

fn write_slice(&mut self, src: &[u8]) -> usize

Trait Implementations

impl MutBuf for MutByteBuf
[src]

fn remaining(&self) -> usize

Returns the number of bytes that can be written to the MutBuf

fn advance(&mut self, cnt: usize)

Advance the internal cursor of the MutBuf

fn mut_bytes<'a>(&'a mut self) -> &'a mut [u8]

Returns a mutable slice starting at the current MutBuf position and of length between 0 and MutBuf::remaining(). Read more

fn has_remaining(&self) -> bool

Returns true iff there is any more space for bytes to be written

fn write_slice(&mut self, src: &[u8]) -> usize

Write bytes from the given slice into the MutBuf and advance the cursor by the number of bytes written. Returns the number of bytes written. Read more

fn write_byte(&mut self, byte: u8) -> bool

Write a single byte to the MuBuf

impl Write for MutByteBuf
[src]

fn write(&mut self, buf: &[u8]) -> Result<usize>

Write a buffer into this object, returning how many bytes were written. Read more

fn flush(&mut self) -> Result<()>

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

fn write_all(&mut self, buf: &[u8]) -> Result<()Error>
1.0.0

Attempts to write an entire buffer into this write. Read more

fn write_fmt(&mut self, fmt: Arguments) -> Result<()Error>
1.0.0

Writes a formatted string into this writer, returning any error encountered. Read more

fn by_ref(&mut self) -> &mut Self
1.0.0

Creates a "by reference" adaptor for this instance of Write. Read more