pub fn next_if_eq<'a, T>(self: Pin<&'a mut Self>, expected: &'a T) -> NextIfEq<'a, St, T>
    where
        T: ?Sized,
        St::Item: PartialEq<T>,
    {
        NextIfEq {
            inner: NextIf { inner: Some((self, NextIfEqFn { expected, _next: PhantomData })) },
        }
    }
Creates a future which will consume and return the next item if it is
equal to `expected`.

# Example

Consume a number if it's equal to 0.

```
# futures::executor::block_on(async {
use core::pin::pin;

use futures::stream;
use futures::stream::StreamExt;

let stream = stream::iter(0..5).peekable();
let mut stream = pin!(stream);
// The first item of the stream is 0; consume it.
assert_eq!(stream.as_mut().next_if_eq(&0).await, Some(0));
// The next item returned is now 1, so `consume` will return `false`.
assert_eq!(stream.as_mut().next_if_eq(&0).await, None);
// `next_if_eq` saves the value of the next item if it was not equal to `expected`.
assert_eq!(stream.next().await, Some(1));
# });
```
futures-util/src/stream/stream/peek.rs