fn try_next(&mut self) -> TryNext<'_, Self>
    where
        Self: Unpin,
    {
        assert_future::<Result<Option<Self::Ok>, Self::Error>, _>(TryNext::new(self))
    }
Creates a future that attempts to resolve the next item in the stream.
If an error is encountered before the next item, the error is returned
instead.

This is similar to the `Stream::next` combinator, but returns a
`Result<Option<T>, E>` rather than an `Option<Result<T, E>>`, making
for easy use with the `?` operator.

# Examples

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

let mut stream = stream::iter(vec![Ok(()), Err(())]);

assert_eq!(stream.try_next().await, Ok(Some(())));
assert_eq!(stream.try_next().await, Err(()));
# })
```
futures-util/src/stream/try_stream/mod.rs