Struct rux::buf::ByteBuffer
[−]
[src]
pub struct ByteBuffer { /* fields omitted */ }
Naive buffer.
FIXME: if pos and limit never catch up, buffer will overflow, when there might be some extra capacity
Methods
impl ByteBuffer
[src]
fn new() -> ByteBuffer
fn with_capacity(cap: usize) -> ByteBuffer
fn len(&self) -> usize
fn is_empty(&self) -> bool
fn capacity(&self) -> usize
fn write(&mut self, b: &[u8]) -> Result<()>
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
fn slice<'a>(&'a self, offset: usize) -> &'a [u8]
fn mut_slice<'a>(&'a mut self, offset: usize) -> &'a mut [u8]
fn extend(&mut self, cnt: usize)
fn consume(&mut self, cnt: usize)
fn clear(&mut self)
Trait Implementations
impl Clone for ByteBuffer
[src]
fn clone(&self) -> ByteBuffer
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more