Struct bytes::MutSliceBuf [] [src]

pub struct MutSliceBuf<'a> {
    // some fields omitted
}

Methods

impl<'a> MutSliceBuf<'a>
[src]

fn wrap(bytes: &'a mut [u8]) -> MutSliceBuf<'a>

Trait Implementations

impl<'a> MutBuf for MutSliceBuf<'a>
[src]

fn remaining(&self) -> usize

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

unsafe fn advance(&mut self, cnt: usize)

Advance the internal cursor of the MutBuf

unsafe fn mut_bytes<'b>(&'b mut self) -> &'b 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