fn try_concat(self) -> TryConcat<Self>
    where
        Self: Sized,
        Self::Ok: Extend<<<Self as TryStream>::Ok as IntoIterator>::Item> + IntoIterator + Default,
    {
        assert_future::<Result<Self::Ok, Self::Error>, _>(TryConcat::new(self))
    }
Attempt to 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 successful 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.

This method is similar to [`concat`](crate::stream::StreamExt::concat), but will
exit early if an error is encountered in the stream.

# Examples

```
# futures::executor::block_on(async {
use futures::channel::mpsc;
use futures::stream::TryStreamExt;
use std::thread;

let (tx, rx) = mpsc::unbounded::<Result<Vec<i32>, ()>>();

thread::spawn(move || {
for i in (0..3).rev() {
let n = i * 3;
tx.unbounded_send(Ok(vec![n + 1, n + 2, n + 3])).unwrap();
}
});

let result = rx.try_concat().await;

assert_eq!(result, Ok(vec![7, 8, 9, 4, 5, 6, 1, 2, 3]));
# });
```
futures-util/src/stream/try_stream/mod.rs