pub trait SinkCloseChannel<T>: Sink<T> {
// Required method
fn close_channel(self: Pin<&mut Self>);
}Expand description
A Sink with a close_channel method like futures::channel::mpsc::Sender’s.
Required Methods§
Sourcefn close_channel(self: Pin<&mut Self>)
fn close_channel(self: Pin<&mut Self>)
Close the channel from the sending end, giving EOF at the receiver
Future attempts to send will get a disconnected error.
This closes all equivalent senders for the underlying data sink.
For example, if Self is Clone, all clones are affected.
If the Sink is for a channel, the receiver will see EOF after reading the messages that were successfully sent so far.