pub trait Buffer {
// Required methods
fn as_bytes(&self) -> &[u8] ⓘ;
fn as_bytes_mut(&mut self) -> &mut [u8] ⓘ;
}
Expand description
Trait for Scratchpad
buffer types.
Buffer
objects contain the memory from which Scratchpad
allocations
are made. Scratchpad
handles all bookkeeping, so a buffer only needs
to provide methods for raw access of the buffer memory.
Required Methods§
Sourcefn as_bytes_mut(&mut self) -> &mut [u8] ⓘ
fn as_bytes_mut(&mut self) -> &mut [u8] ⓘ
Returns a mutable byte slice of the buffer contents.