pub trait BufferMut {
// Required methods
fn capacity(&self) -> usize;
fn write<const N: usize>(&mut self, offset: usize, val: &[u8; N]);
fn write_slice(&mut self, offset: usize, val: &[u8]);
// Provided method
fn try_enlarge(&mut self, wanted: usize) -> Result<(), EnlargeError> { ... }
}
Required Methods§
fn capacity(&self) -> usize
fn write<const N: usize>(&mut self, offset: usize, val: &[u8; N])
fn write_slice(&mut self, offset: usize, val: &[u8])
Provided Methods§
fn try_enlarge(&mut self, wanted: usize) -> Result<(), EnlargeError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.