pub trait NonvolatileStorage<'a> {
// Required methods
fn set_client(&self, client: &'a dyn NonvolatileStorageClient);
fn read(
&self,
buffer: &'static mut [u8],
address: usize,
length: usize,
) -> Result<(), ErrorCode>;
fn write(
&self,
buffer: &'static mut [u8],
address: usize,
length: usize,
) -> Result<(), ErrorCode>;
}Expand description
Simple interface for reading and writing nonvolatile memory. It is expected that drivers for nonvolatile memory would implement this trait.
Required Methods§
fn set_client(&self, client: &'a dyn NonvolatileStorageClient)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".