pub struct SendSink<'a, T>(_);
Expand description
A sink that allows sending values into a channel.
Can be created via Sender::sink
or Sender::into_sink
.
Implementations§
source§impl<'a, T> SendSink<'a, T>
impl<'a, T> SendSink<'a, T>
sourcepub fn sender(&self) -> &Sender<T>
pub fn sender(&self) -> &Sender<T>
Returns a clone of a sending half of the channel of this sink.
sourcepub fn is_disconnected(&self) -> bool
pub fn is_disconnected(&self) -> bool
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
See Sender::is_empty
.
sourcepub fn is_full(&self) -> bool
pub fn is_full(&self) -> bool
See Sender::is_full
.
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
See Sender::len
.
sourcepub fn capacity(&self) -> Option<usize>
pub fn capacity(&self) -> Option<usize>
See Sender::capacity
.
Trait Implementations§
source§impl<'a, T> Sink<T> for SendSink<'a, T>
impl<'a, T> Sink<T> for SendSink<'a, T>
source§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink
to receive a value. Read moresource§fn start_send(self: Pin<&mut Self>, item: T) -> Result<(), Self::Error>
fn start_send(self: Pin<&mut Self>, item: T) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read more