Trait askar_crypto::buffer::ResizeBuffer
source · pub trait ResizeBuffer: WriteBuffer + AsRef<[u8]> + AsMut<[u8]> {
// Required methods
fn buffer_insert(&mut self, pos: usize, data: &[u8]) -> Result<(), Error>;
fn buffer_remove(&mut self, range: Range<usize>) -> Result<(), Error>;
fn buffer_resize(&mut self, len: usize) -> Result<(), Error>;
// Provided method
fn buffer_extend(&mut self, len: usize) -> Result<&mut [u8], Error> { ... }
}Expand description
Support for writing to, accessing, and resizing a byte buffer
Required Methods§
sourcefn buffer_insert(&mut self, pos: usize, data: &[u8]) -> Result<(), Error>
fn buffer_insert(&mut self, pos: usize, data: &[u8]) -> Result<(), Error>
Insert a slice at the given position in the buffer
Provided Methods§
Implementations on Foreign Types§
source§impl ResizeBuffer for Vec<u8>
Available on crate feature alloc only.
impl ResizeBuffer for Vec<u8>
Available on crate feature
alloc only.