Struct Enumerate
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
pub struct Enumerate<I> { /* private fields */ }
Enumerate is an iterator that returns the current count along with the element.
This struct is created by the enumerate() method on IndexedParallelIterator
Trait Implementations
impl<I> IndexedParallelIterator for Enumerate<I>
where
I: IndexedParallelIterator,
fn drive<C: Consumer<Self::Item>>(self, consumer: C) -> C::Resultfn len(&self) -> usizefn with_producer<CB>(self, callback: CB) -> CB::Output where CB: ProducerCallback<Self::Item>,
impl<I> ParallelIterator for Enumerate<I>
where
I: IndexedParallelIterator,
type Item = (usize, <I as ParallelIterator>::Item);fn drive_unindexed<C>(self, consumer: C) -> C::Result where C: UnindexedConsumer<Self::Item>,fn opt_len(&self) -> Option<usize>
impl<I: Clone> Clone for Enumerate<I>
fn clone(&self) -> Enumerate<I>
impl<I: Debug> Debug for Enumerate<I>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<I> Freeze for Enumerate<I>
where
I: Freeze,
impl<I> RefUnwindSafe for Enumerate<I>
where
I: RefUnwindSafe,
impl<I> Send for Enumerate<I>
where
I: Send,
impl<I> Sync for Enumerate<I>
where
I: Sync,
impl<I> Unpin for Enumerate<I>
where
I: Unpin,
impl<I> UnsafeUnpin for Enumerate<I>
where
I: UnsafeUnpin,
impl<I> UnwindSafe for Enumerate<I>
where
I: UnwindSafe,
Blanket Implementations
impl<T> Any for Enumerate<I>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Enumerate<I>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Enumerate<I>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Enumerate<I>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Enumerate<I>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> IntoEither for Enumerate<I>
impl<T> IntoParallelIterator for Enumerate<I>
where
T: ParallelIterator,
type Iter = T;type Item = <T as ParallelIterator>::Item;fn into_par_iter(self) -> T
impl<T> Pointable for Enumerate<I>
const ALIGN: usize = _;type Init = T;unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> ToOwned for Enumerate<I>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Enumerate<I>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Enumerate<I>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Enumerate<I>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>