Struct

core::iter::Enumerate

source
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 core::iter.

enumerate: the next item with its index.