fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
    where
        F: FnMut(Self::Item) -> Fut,
        Fut: Future,
        Self: Sized,
    {
        assert_stream::<Fut::Output, _>(Then::new(self, f))
    }
/// Computes from this stream's items new items of a different type using
/// an asynchronous closure.
///
/// The provided closure `f` will be called with an `Item` once a value is
/// ready, it returns a future which will then be run to completion
/// to produce the next value on this stream.
///
/// Note that this function consumes the stream passed into it and returns a
/// wrapped version of it.
///
/// # Examples
///
/// ```
/// # futures::executor::block_on(async {
/// use futures::stream::{self, StreamExt};
///
/// let stream = stream::iter(1..=3);
/// let stream = stream.then(|x| async move { x + 3 });
///
/// assert_eq!(vec![4, 5, 6], stream.collect::<Vec<_>>().await);
/// # });
/// ```
Computes from this stream's items new items of a different type using
an asynchronous closure.

The provided closure `f` will be called with an `Item` once a value is
ready, it returns a future which will then be run to completion
to produce the next value on this stream.

Note that this function consumes the stream passed into it and returns a
wrapped version of it.
Computes from this stream ' s items new items of a different type using an asynchronous closure . The provided closure ` f ` will be called with an ` Item ` once a value is ready it returns a future which will then be run to completion to produce the next value on this stream . Note that this function consumes the stream passed into it and returns a wrapped version of it .
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
    where
        F: FnMut(Self::Item) -> Fut,
        Fut: Future,
        Self: Sized,
    {
        assert_stream::<Fut::Output, _>(Then::new(self, f))
    }
fn then < Fut , F > ( self , f : F ) -> Then < Self , Fut , F > where F : FnMut ( Self :: Item ) -> Fut , Fut : Future , Self : Sized , { assert_stream :: < Fut :: Output , _ > ( Then :: new ( self , f ) ) }
Computes from this stream's items new items of a different type using
an asynchronous closure.
Computes from this stream ' s items new items of a different type using an asynchronous closure .
self
f
F
self
f
F
examples
None
futures::executor::block_on(async {
use futures::stream::{self, StreamExt}.

let stream = stream::iter(1..=3);
let stream = stream.then(|x| async move { x + 3 }).


use futures :: stream :: { self StreamExt } . let stream = stream :: iter ( 1 .. = 3 ) ; let stream = stream . then ( |x| async move { x + 3 } ) .
});
None