peek

Function peek 

Source
pub async fn peek<'d, S: NorFlash>(
    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

Peek at the oldest data.

If you also want to remove the data use pop.

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.