Struct sequential_storage::queue::PeekIterator
source · pub struct PeekIterator<'d, S: NorFlash, CI: CacheImpl> { /* private fields */ }
Expand description
Iterator for peek’ing elements in the queue.
Implementations§
source§impl<'d, S: NorFlash, CI: CacheImpl> PeekIterator<'d, S, CI>
impl<'d, S: NorFlash, CI: CacheImpl> PeekIterator<'d, S, CI>
sourcepub async fn next<'m>(
&mut self,
data_buffer: &'m mut [u8]
) -> Result<Option<&'m mut [u8]>, Error<Infallible, S::Error>>
pub async fn next<'m>( &mut self, data_buffer: &'m mut [u8] ) -> Result<Option<&'m mut [u8]>, Error<Infallible, S::Error>>
Peek at the next data.
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.
Trait Implementations§
Auto Trait Implementations§
impl<'d, S, CI> RefUnwindSafe for PeekIterator<'d, S, CI>where
CI: RefUnwindSafe,
S: RefUnwindSafe,
impl<'d, S, CI> Send for PeekIterator<'d, S, CI>
impl<'d, S, CI> Sync for PeekIterator<'d, S, CI>
impl<'d, S, CI> Unpin for PeekIterator<'d, S, CI>where
CI: Unpin,
impl<'d, S, CI> !UnwindSafe for PeekIterator<'d, S, CI>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more