fn all<Fut, F>(self, f: F) -> All<Self, Fut, F>
    where
        F: FnMut(Self::Item) -> Fut,
        Fut: Future<Output = bool>,
        Self: Sized,
    {
        assert_future::<bool, _>(All::new(self, f))
    }
/// Execute predicate over asynchronous stream, and return `true` if all 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 less_then_twenty = number_stream.all(|i| async move { i < 20 });
/// assert_eq!(less_then_twenty.await, true);
/// # });
/// ```
Execute predicate over asynchronous stream, and return `true` if all element in stream satisfied a predicate.
Execute predicate over asynchronous stream and return ` true ` if all element in stream satisfied a predicate .
fn all<Fut, F>(self, f: F) -> All<Self, Fut, F>
    where
        F: FnMut(Self::Item) -> Fut,
        Fut: Future<Output = bool>,
        Self: Sized,
    {
        assert_future::<bool, _>(All::new(self, f))
    }
fn all < Fut , F > ( self , f : F ) -> All < Self , Fut , F > where F : FnMut ( Self :: Item ) -> Fut , Fut : Future < Output = bool > , Self : Sized , { assert_future :: < bool , _ > ( All :: new ( self , f ) ) }
Execute predicate over asynchronous stream, and return `true` if all element in stream satisfied a predicate.
Execute predicate over asynchronous stream and return ` true ` if all 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 less_then_twenty = number_stream.all(|i| async move { i < 20 });
assert_eq!(less_then_twenty.await, true).
use futures :: stream :: { self StreamExt } . let number_stream = stream :: iter ( 0 .. 10 ) ; let less_then_twenty = number_stream . all ( |i| async move { i < 20 } ) ; assert_eq! ( less_then_twenty . await true ) .
});
None