fn try_flatten_stream(self) -> TryFlattenStream<Self>
    where
        Self::Ok: TryStream<Error = Self::Error>,
        Self: Sized,
    {
        assert_stream::<Result<<Self::Ok as TryStream>::Ok, Self::Error>, _>(TryFlattenStream::new(
            self,
        ))
    }
/// Flatten the execution of this future when the successful result of this
/// future is a stream.
///
/// This can be useful when stream initialization is deferred, and it is
/// convenient to work with that stream as if stream was available at the
/// call site.
///
/// Note that this function consumes this future and returns a wrapped
/// version of it.
///
/// # Examples
///
/// ```
/// # futures::executor::block_on(async {
/// use futures::future::TryFutureExt;
/// use futures::stream::{self, TryStreamExt};
///
/// let stream_items = vec![17, 18, 19].into_iter().map(Ok);
/// let future_of_a_stream = async { Ok::<_, ()>(stream::iter(stream_items)) };
///
/// let stream = future_of_a_stream.try_flatten_stream();
/// let list = stream.try_collect::<Vec<_>>().await;
/// assert_eq!(list, Ok(vec![17, 18, 19]));
/// # });
/// ```
Flatten the execution of this future when the successful result of this
future is a stream.

This can be useful when stream initialization is deferred, and it is
convenient to work with that stream as if stream was available at the
call site.

Note that this function consumes this future and returns a wrapped
version of it.
Flatten the execution of this future when the successful result of this future is a stream . This can be useful when stream initialization is deferred and it is convenient to work with that stream as if stream was available at the call site . Note that this function consumes this future and returns a wrapped version of it .
fn try_flatten_stream(self) -> TryFlattenStream<Self>
    where
        Self::Ok: TryStream<Error = Self::Error>,
        Self: Sized,
    {
        assert_stream::<Result<<Self::Ok as TryStream>::Ok, Self::Error>, _>(TryFlattenStream::new(
            self,
        ))
    }
fn try_flatten_stream ( self ) -> TryFlattenStream < Self > where Self :: Ok : TryStream < Error = Self :: Error > , Self : Sized , { assert_stream :: < Result < < Self :: Ok as TryStream > :: Ok , Self :: Error > , _ > ( TryFlattenStream :: new ( self , ) ) }
Flatten the execution of this future when the successful result of this
future is a stream.
Flatten the execution of this future when the successful result of this future is a stream .
self
self
examples
None
futures::executor::block_on(async {
use futures::future::TryFutureExt;
use futures::stream::{self, TryStreamExt}.



let stream = future_of_a_stream.try_flatten_stream();
let list = stream.try_collect::>().await;
assert_eq!(list, Ok(vec![17, 18, 19])).
use futures :: future :: TryFutureExt ; use futures :: stream :: { self TryStreamExt } . let stream = future_of_a_stream . try_flatten_stream () ; let list = stream . try_collect :: > () . await ; assert_eq! ( list Ok ( vec! [ 17 18 19 ] )) .
});
None