Struct bytes::buf::SliceBuf
[−]
[src]
pub struct SliceBuf<'a> { /* fields omitted */ }
Methods
impl<'a> SliceBuf<'a>
[src]
Trait Implementations
impl<'a> Buf for SliceBuf<'a>
[src]
fn remaining(&self) -> usize
Returns the number of bytes that can be accessed from the Buf
fn bytes<'b>(&'b self) -> &'b [u8]
Returns a slice starting at the current Buf position and of length between 0 and Buf::remaining()
. Read more
fn advance(&mut self, cnt: usize)
Advance the internal cursor of the Buf
fn has_remaining(&self) -> bool
Returns true if there are any more bytes to consume
fn read_slice(&mut self, dst: &mut [u8]) -> usize
Read bytes from the Buf
into the given slice and advance the cursor by the number of bytes read. Returns the number of bytes read. Read more
fn read_byte(&mut self) -> Option<u8>
Read a single byte from the Buf