pub trait BufferBackend {
// Required methods
fn with_data<F>(&self, from: usize, to: usize, f: F) -> Result<(), Error>
where F: FnMut(&[u8]) -> Result<(), Error>;
fn with_data_mut<F>(
&mut self,
from: usize,
to: usize,
f: F,
) -> Result<(), Error>
where F: FnMut(&mut [u8]) -> Result<(), Error>;
fn size(&self) -> usize;
}
Expand description
Trait representing a buffer backend for the NOR flash memory.
Required Methods§
Sourcefn with_data<F>(&self, from: usize, to: usize, f: F) -> Result<(), Error>
fn with_data<F>(&self, from: usize, to: usize, f: F) -> Result<(), Error>
Executes a closure with a slice of data from the buffer.
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.