pub async fn remove_all_items<K: Key, S: MultiwriteNorFlash>(
flash: &mut S,
flash_range: Range<u32>,
cache: &mut impl KeyCacheImpl<K>,
data_buffer: &mut [u8],
) -> Result<(), Error<S::Error>>
Expand description
Fully remove all stored items. Additional calls to fetch with any key will return None until new items are stored again.
This might be really slow! This doesn't simply erase flash, but goes through all items and marks them as deleted.
This is better for flash endurance.
You might want to simply erase the flash range, e.g. if your flash does not implement MultiwriteNorFlash. Consider using the helper method for that: crate::erase_all.