#[doc(hidden)] pub struct ArrayConsumer<T, N: ArrayLength<T>> { /* private fields */ }Expand description
Consumes an array.
Increment the position while iterating and any leftover elements will be dropped if position does not go to N
Implementations§
Source§impl<T, N: ArrayLength<T>> ArrayConsumer<T, N>
impl<T, N: ArrayLength<T>> ArrayConsumer<T, N>
#[doc(hidden)] pub unsafe fn new( array: GenericArray<T, N>, ) -> ArrayConsumer<T, N>
Source#[doc(hidden)] pub unsafe fn iter_position(
&mut self,
) -> (Iter<'_, T>, &mut usize)
#[doc(hidden)] pub unsafe fn iter_position( &mut self, ) -> (Iter<'_, T>, &mut usize)
Creates an iterator and mutable reference to the internal position to keep track of consumed elements.
Increment the position as you iterate to mark off consumed elements