pub async fn store_item<I: StorageItem, S: NorFlash>(
    flash: &mut S,
    flash_range: Range<u32>,
    cache: impl CacheImpl,
    data_buffer: &mut [u8],
    item: &I
) -> Result<(), MapError<I::Error, S::Error>>
Expand description

Store an item into flash memory. It will overwrite the last value that has the same key. The flash needs to be at least 2 pages long.

The data buffer must be long enough to hold the longest serialized data of your StorageItem type.

Note: On a given flash range, make sure to use only the same type as StorageItem every time or types that serialize and deserialize the key in the same way.