pub struct RamStorage { /* private fields */ }Expand description
In-memory block device for testing and examples.
Simulates flash: erased blocks are 0xFF, writes overwrite bytes, and
erase resets a block to 0xFF. Use with Config and
Filesystem.
Implementations§
Source§impl RamStorage
impl RamStorage
Trait Implementations§
Source§impl Storage for RamStorage
impl Storage for RamStorage
Source§fn read(&mut self, block: u32, offset: u32, buf: &mut [u8]) -> Result<(), Error>
fn read(&mut self, block: u32, offset: u32, buf: &mut [u8]) -> Result<(), Error>
Read
buf.len() bytes starting at offset within block.Auto Trait Implementations§
impl Freeze for RamStorage
impl RefUnwindSafe for RamStorage
impl Send for RamStorage
impl Sync for RamStorage
impl Unpin for RamStorage
impl UnsafeUnpin for RamStorage
impl UnwindSafe for RamStorage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more