fn next(&mut self) -> Next<'_, Self>
    where
        Self: Unpin,
    {
        assert_future::<Option<Self::Item>, _>(Next::new(self))
    }
Creates a future that resolves to the next item in the stream.

Note that because `next` doesn't take ownership over the stream,
the [`Stream`] type must be [`Unpin`]. If you want to use `next` with a
[`!Unpin`](Unpin) stream, you'll first have to pin the stream. This can
be done by boxing the stream using [`Box::pin`] or
pinning it to the stack using the `pin_mut!` macro from the `pin_utils`
crate.

# Examples

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

let mut stream = stream::iter(1..=3);

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