Struct

std::iter::Enumerate

source

Re-exported from core::iter::Enumerate.

forall I.
exposed struct Enumerate {
    inner: I,
    index: usize,
}

Each item with its index, counting from 0: Pair { a: index, b: item }.

Instances

instance Iterator[Enumerate[I] -> Pair[usize, T]]source

forall I, T where Iterator[I -> T].
instance Iterator[Enumerate[I] -> Pair[usize, T]] { ... }

In std::iter.

enumerate: the next item with its index.