fn flatten_sink(self) -> FlattenSink<Self, Self::Ok>
    where
        Self::Ok: Sink<SinkError = Self::Error>,
        Self: Sized,
    {
        FlattenSink::new(self)
    }
/// Flattens the execution of this future when the successful result of this
/// future is a [`Sink`].
///
/// This can be useful when sink initialization is deferred, and it is
/// convenient to work with that sink as if the sink was available at the
/// call site.
///
/// Note that this function consumes this future and returns a wrapped
/// version of it.
///
/// # Examples
///
/// ```
/// #![feature(futures_api)]
/// use futures::future::{Future, TryFutureExt};
/// use futures::sink::Sink;
/// # use futures::channel::mpsc::{self, SendError};
/// # type T = i32;
/// # type E = SendError;
///
/// fn make_sink_async() -> impl Future<Output = Result<
///     impl Sink<SinkItem = T, SinkError = E>,
///     E,
/// >> { // ... }
/// # let (tx, _rx) = mpsc::unbounded::<i32>();
/// # futures::future::ready(Ok(tx))
/// # }
/// fn take_sink(sink: impl Sink<SinkItem = T, SinkError = E>) { /* ... */ }
///
/// let fut = make_sink_async();
/// take_sink(fut.flatten_sink())
/// ```
Flattens the execution of this future when the successful result of this
future is a [`Sink`].

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

Note that this function consumes this future and returns a wrapped
version of it.
Flattens the execution of this future when the successful result of this future is a [ ` Sink ` ] . This can be useful when sink initialization is deferred and it is convenient to work with that sink as if the sink was available at the call site . Note that this function consumes this future and returns a wrapped version of it .
fn flatten_sink(self) -> FlattenSink<Self, Self::Ok>
    where
        Self::Ok: Sink<SinkError = Self::Error>,
        Self: Sized,
    {
        FlattenSink::new(self)
    }
fn flatten_sink ( self ) -> FlattenSink < Self , Self :: Ok > where Self :: Ok : Sink < SinkError = Self :: Error > , Self : Sized , { FlattenSink :: new ( self ) }
Flattens the execution of this future when the successful result of this
future is a [`Sink`].
Flattens the execution of this future when the successful result of this future is a [ ` Sink ` ] .
self
examples
None
![feature(futures_api)]
use futures::future::{Future, TryFutureExt};
use futures::sink::Sink.
use futures :: future :: { Future TryFutureExt } ; use futures :: sink :: Sink .
use futures::channel::mpsc::{self, senderror};
None
type t = i32;
None
type e = senderror;
None
let (tx, _rx) = mpsc::unbounded::<i32>();
None
futures::future::ready(ok(tx))
None
}
fn take_sink(sink: impl Sink) {  ...

let fut = make_sink_async();
take_sink(fut.flatten_sink())
```
fn take_sink ( sink : impl Sink ) { ... let fut = make_sink_async () ; take_sink ( fut . flatten_sink () ) ` ` `