fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F>
    where
        F: FnMut(Self::Item) -> Fut,
        Fut: Future<Output = bool>,
        Self: Sized,
    {
        assert_future::<bool, _>(Any::new(self, f))
    }
/// Execute predicate over asynchronous stream, and return `true` if any element in stream satisfied a predicate.
///
/// # Examples
///
/// ```
/// # futures::executor::block_on(async {
/// use futures::stream::{self, StreamExt};
///
/// let number_stream = stream::iter(0..10);
/// let contain_three = number_stream.any(|i| async move { i == 3 });
/// assert_eq!(contain_three.await, true);
/// # });
/// ```
Execute predicate over asynchronous stream, and return `true` if any element in stream satisfied a predicate.
Execute predicate over asynchronous stream and return ` true ` if any element in stream satisfied a predicate .
fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F>
    where
        F: FnMut(Self::Item) -> Fut,
        Fut: Future<Output = bool>,
        Self: Sized,
    {
        assert_future::<bool, _>(Any::new(self, f))
    }
fn any < Fut , F > ( self , f : F ) -> Any < Self , Fut , F > where F : FnMut ( Self :: Item ) -> Fut , Fut : Future < Output = bool > , Self : Sized , { assert_future :: < bool , _ > ( Any :: new ( self , f ) ) }
Execute predicate over asynchronous stream, and return `true` if any element in stream satisfied a predicate.
Execute predicate over asynchronous stream and return ` true ` if any element in stream satisfied a predicate .
self
f
F
self
f
F
examples
None
futures::executor::block_on(async {
use futures::stream::{self, StreamExt}.

let number_stream = stream::iter(0..10);
let contain_three = number_stream.any(|i| async move { i == 3 });
assert_eq!(contain_three.await, true).
use futures :: stream :: { self StreamExt } . let number_stream = stream :: iter ( 0 .. 10 ) ; let contain_three = number_stream . any ( |i| async move { i == 3 } ) ; assert_eq! ( contain_three . await true ) .
});
None