pub struct MeasuredMockFlash<const SIZE: usize> {
pub stats: MeasuredStats,
/* private fields */
}Expand description
Mock flash device that tracks operation statistics
Wraps MockFlash and counts the number of bytes read/written and erase operations.
Useful for analyzing storage efficiency and optimization.
Fields§
§stats: MeasuredStatsStatistics for all flash operations performed
Implementations§
Trait Implementations§
Source§impl<const SIZE: usize> Debug for MeasuredMockFlash<SIZE>
impl<const SIZE: usize> Debug for MeasuredMockFlash<SIZE>
Source§impl<const SIZE: usize> Default for MeasuredMockFlash<SIZE>
impl<const SIZE: usize> Default for MeasuredMockFlash<SIZE>
Source§fn default() -> MeasuredMockFlash<SIZE>
fn default() -> MeasuredMockFlash<SIZE>
Returns the “default value” for a type. Read more
Source§impl<const SIZE: usize> Flash for MeasuredMockFlash<SIZE>
impl<const SIZE: usize> Flash for MeasuredMockFlash<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
Auto Trait Implementations§
impl<const SIZE: usize> Freeze for MeasuredMockFlash<SIZE>
impl<const SIZE: usize> RefUnwindSafe for MeasuredMockFlash<SIZE>
impl<const SIZE: usize> Send for MeasuredMockFlash<SIZE>
impl<const SIZE: usize> Sync for MeasuredMockFlash<SIZE>
impl<const SIZE: usize> Unpin for MeasuredMockFlash<SIZE>
impl<const SIZE: usize> UnwindSafe for MeasuredMockFlash<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