pub struct BufferMut<'a> { /* private fields */ }Implementations§
Source§impl<'a> BufferMut<'a>
impl<'a> BufferMut<'a>
pub fn new(slice: &'a mut [u8]) -> Self
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Sourcepub fn append(&mut self, bytes: &[u8])
pub fn append(&mut self, bytes: &[u8])
Appends the provided bytes to the buffer, panicking if insufficient space is available in the buffer.
Sourcepub fn append_or<T>(&mut self, bytes: &[u8], error: T) -> Result<(), T>
pub fn append_or<T>(&mut self, bytes: &[u8], error: T) -> Result<(), T>
Appends the provided bytes to the buffer, returning error if insufficient space is
available in the buffer.
Sourcepub fn try_append(&mut self, bytes: &[u8]) -> Option<()>
pub fn try_append(&mut self, bytes: &[u8]) -> Option<()>
Appends the provided bytes to the buffer, panicking if insufficient space is available in the buffer.