pub async fn pop<'d, S: MultiwriteNorFlash>(
flash: &mut S,
flash_range: Range<u32>,
cache: &mut impl CacheImpl,
data_buffer: &'d mut [u8],
) -> Result<Option<&'d mut [u8]>, Error<S::Error>>
Expand description
Pop the oldest data from the queue.
If you don’t want to remove the data use peek.
The data is written to the given data_buffer
and the part that was written is returned.
It is valid to only use the length of the returned slice and use the original data_buffer
.
The data_buffer
may contain extra data on ranges after the returned slice.
You should not depend on that data.
If the data buffer is not big enough an error is returned.