fn concat(self) -> Concat<Self>
    where
        Self: Sized,
        Self::Item: Extend<<<Self as Stream>::Item as IntoIterator>::Item> + IntoIterator + Default,
    {
        assert_future::<Self::Item, _>(Concat::new(self))
    }
/// Concatenate all items of a stream into a single extendable
/// destination, returning a future representing the end result.
///
/// This combinator will extend the first item with the contents
/// of all the subsequent results of the stream. If the stream is
/// empty, the default value will be returned.
///
/// Works with all collections that implement the
/// [`Extend`](std::iter::Extend) trait.
///
/// # Examples
///
/// ```
/// # futures::executor::block_on(async {
/// use futures::channel::mpsc;
/// use futures::stream::StreamExt;
/// use std::thread;
///
/// let (tx, rx) = mpsc::unbounded();
///
/// thread::spawn(move || {
///     for i in (0..3).rev() {
///         let n = i * 3;
///         tx.unbounded_send(vec![n + 1, n + 2, n + 3]).unwrap();
///     }
/// });
///
/// let result = rx.concat().await;
///
/// assert_eq!(result, vec![7, 8, 9, 4, 5, 6, 1, 2, 3]);
/// # });
/// ```
Concatenate all items of a stream into a single extendable
destination, returning a future representing the end result.

This combinator will extend the first item with the contents
of all the subsequent results of the stream. If the stream is
empty, the default value will be returned.

Works with all collections that implement the
[`Extend`](std::iter::Extend) trait.
Concatenate all items of a stream into a single extendable destination returning a future representing the end result . This combinator will extend the first item with the contents of all the subsequent results of the stream . If the stream is empty the default value will be returned . Works with all collections that implement the [ ` Extend ` ] ( std :: iter :: Extend ) trait .
fn concat(self) -> Concat<Self>
    where
        Self: Sized,
        Self::Item: Extend<<<Self as Stream>::Item as IntoIterator>::Item> + IntoIterator + Default,
    {
        assert_future::<Self::Item, _>(Concat::new(self))
    }
fn concat ( self ) -> Concat < Self > where Self : Sized , Self :: Item : Extend < < < Self as Stream > :: Item as IntoIterator > :: Item > + IntoIterator + Default , { assert_future :: < Self :: Item , _ > ( Concat :: new ( self ) ) }
Concatenate all items of a stream into a single extendable
destination, returning a future representing the end result.
Concatenate all items of a stream into a single extendable destination returning a future representing the end result .
self
self
examples
None
futures::executor::block_on(async {
use futures::channel::mpsc;
use futures::stream::StreamExt;
use std::thread.

let (tx, rx) = mpsc::unbounded().



let result = rx.concat().await.


use futures :: channel :: mpsc ; use futures :: stream :: StreamExt ; use std :: thread . let ( tx rx ) = mpsc :: unbounded () . let result = rx . concat () . await .
});
None