pub struct ChunkBuf { /* private fields */ }
Expand description
A buffer used by ChunkBuilder
Implementations
sourceimpl ChunkBuf
impl ChunkBuf
pub fn new(info: ChunkInfo) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn as_slice(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn as_mut_slice(&mut self) -> &mut [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn push_byte(&mut self, byte: impl Into<u8>)
pub fn extend_bytes(&mut self, bytes: &[u8])
pub fn patch_bytes(&mut self, offset: usize, patch: &[u8])
sourcepub fn resize_patch(&mut self, offset: usize, from_len: usize, to_len: usize)
pub fn resize_patch(&mut self, offset: usize, from_len: usize, to_len: usize)
anything previously inside the patch is overwritten
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ChunkBuf
impl Send for ChunkBuf
impl Sync for ChunkBuf
impl Unpin for ChunkBuf
impl UnwindSafe for ChunkBuf
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more