Function push

Source
pub async fn push<S: NorFlash>(
    flash: &mut S,
    flash_range: Range<u32>,
    cache: &mut impl CacheImpl,
    data: &[u8],
    allow_overwrite_old_data: bool,
) -> Result<(), Error<S::Error>>
Expand description

Push data into the queue in the given flash memory with the given range. The data can only be taken out with the pop function.

Old data will not be overwritten unless allow_overwrite_old_data is true. If it is, then if the queue is full, the oldest data is removed to make space for the new data.

Note: If a page is already used and you push more data than the remaining capacity of the page, the entire remaining capacity will go unused because the data is stored on the next page.