pub trait Storage {
const SUPPORTS_GROW: bool = false;
// Required methods
fn allocate(&mut self, size: usize) -> Result<(), Status>;
fn get_data(&self) -> &[usize];
fn get_data_mut(&mut self) -> &mut [usize];
// Provided method
fn grow(&mut self, _size: usize) -> Result<(), Status> { ... }
}Expand description
Trait for the backing storage of a raw bitmap.
Provided Associated Constants§
Sourceconst SUPPORTS_GROW: bool = false
const SUPPORTS_GROW: bool = false
True if this storage supports growing.
Required Methods§
Sourcefn allocate(&mut self, size: usize) -> Result<(), Status>
fn allocate(&mut self, size: usize) -> Result<(), Status>
Allocates at least size bytes of storage.
Sourcefn get_data(&self) -> &[usize]
fn get_data(&self) -> &[usize]
Returns a read-only slice of usize words to the underlying storage.
Sourcefn get_data_mut(&mut self) -> &mut [usize]
fn get_data_mut(&mut self) -> &mut [usize]
Returns a mutable slice of usize words to the underlying storage.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".