pub struct ChainBuffer { /* private fields */ }Expand description
A chain of fixed-size byte buffers.
Implementations§
Source§impl ChainBuffer
impl ChainBuffer
pub fn new(link_capacity: usize) -> Self
pub fn write(&mut self, data: &[u8])
pub fn total_bytes(&self) -> usize
pub fn link_count(&self) -> usize
pub fn link_capacity(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn to_vec(&self) -> Vec<u8> ⓘ
pub fn clear(&mut self)
pub fn read_at(&self, offset: usize) -> Option<u8>
pub fn wasted_bytes(&self) -> usize
Trait Implementations§
Source§impl Clone for ChainBuffer
impl Clone for ChainBuffer
Source§fn clone(&self) -> ChainBuffer
fn clone(&self) -> ChainBuffer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ChainBuffer
impl RefUnwindSafe for ChainBuffer
impl Send for ChainBuffer
impl Sync for ChainBuffer
impl Unpin for ChainBuffer
impl UnsafeUnpin for ChainBuffer
impl UnwindSafe for ChainBuffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more