pub struct MockFlash<const SIZE: usize> { /* private fields */ }Expand description
Simple mock flash device with byte-level operations
Simulates EEPROM-like flash where individual bytes can be written. Initialized with all bytes set to 0xFF (erased state).
Implementations§
Trait Implementations§
Source§impl<const SIZE: usize> Flash for MockFlash<SIZE>
impl<const SIZE: usize> Flash for MockFlash<SIZE>
Source§type Error = Infallible
type Error = Infallible
The error type for flash operations
Source§fn read(&mut self, addr: u32, buf: &mut [u8]) -> Result<(), Self::Error>
fn read(&mut self, addr: u32, buf: &mut [u8]) -> Result<(), Self::Error>
Read data from flash memory at the specified byte address Read more
Source§fn write(&mut self, addr: u32, data: &mut [u8]) -> Result<(), Self::Error>
fn write(&mut self, addr: u32, data: &mut [u8]) -> Result<(), Self::Error>
Write data to flash memory at the specified address Read more
impl<const SIZE: usize> StructuralPartialEq for MockFlash<SIZE>
Auto Trait Implementations§
impl<const SIZE: usize> Freeze for MockFlash<SIZE>
impl<const SIZE: usize> RefUnwindSafe for MockFlash<SIZE>
impl<const SIZE: usize> Send for MockFlash<SIZE>
impl<const SIZE: usize> Sync for MockFlash<SIZE>
impl<const SIZE: usize> Unpin for MockFlash<SIZE>
impl<const SIZE: usize> UnwindSafe for MockFlash<SIZE>
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