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);
/// # });
/// ```
Creates a future that resolves to the next item in the stream.
Creates a future that resolves to the next item in the stream .
fn next(&mut self) -> Next<'_, Self>
    where
        Self: Unpin,
    {
        assert_future::<Option<Self::Item>, _>(Next::new(self))
    }
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.
Creates a future that resolves to the next item in the stream .
&mut self
&mut self
examples
None
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).
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 ) .
});
None