fn enumerate(self) -> Enumerate<Self>
    where
        Self: Sized,
    {
        assert_stream::<(usize, Self::Item), _>(Enumerate::new(self))
    }
Creates a stream which gives the current iteration count as well as
the next value.

The stream returned yields pairs `(i, val)`, where `i` is the
current index of iteration and `val` is the value returned by the
stream.

`enumerate()` keeps its count as a [`usize`]. If you want to count by a
different sized integer, the [`zip`](StreamExt::zip) function provides similar
functionality.

# Overflow Behavior

The method does no guarding against overflows, so enumerating more than
[`usize::MAX`] elements either produces the wrong result or panics. If
debug assertions are enabled, a panic is guaranteed.

# Panics

The returned stream might panic if the to-be-returned index would
overflow a [`usize`].

# Examples

```
# futures::executor::block_on(async {
use futures::stream::{self, StreamExt};

let stream = stream::iter(vec!['a', 'b', 'c']);

let mut stream = stream.enumerate();

assert_eq!(stream.next().await, Some((0, 'a')));
assert_eq!(stream.next().await, Some((1, 'b')));
assert_eq!(stream.next().await, Some((2, 'c')));
assert_eq!(stream.next().await, None);
# });
```
futures-util/src/stream/stream/mod.rs