Struct UnboundedSender
struct UnboundedSender<T>(_)
The transmission end of an unbounded mpsc channel.
This value is created by the unbounded function.
Implementations
impl<T> UnboundedSender<T>
fn poll_ready(self: &Self, _: &mut Context<'_>) -> Poll<Result<(), SendError>>Check if the channel is ready to receive a message.
fn is_closed(self: &Self) -> boolReturns whether this channel is closed without needing a context.
fn close_channel(self: &Self)Closes this channel from the sender side, preventing any new messages.
fn disconnect(self: &mut Self)Disconnects this sender from the channel, closing it if there are no more senders left.
fn start_send(self: &mut Self, msg: T) -> Result<(), SendError>Send a message on the channel.
This method should only be called after
poll_readyhas been used to verify that the channel is ready to receive a message.fn unbounded_send(self: &Self, msg: T) -> Result<(), TrySendError<T>>Sends a message along this channel.
This is an unbounded sender, so this function differs from
Sink::sendby ensuring the return type reflects that the channel is always ready to receive messages.fn same_receiver(self: &Self, other: &Self) -> boolReturns whether the senders send to the same receiver.
fn is_connected_to(self: &Self, receiver: &UnboundedReceiver<T>) -> boolReturns whether the sender send to this receiver.
fn hash_receiver<H>(self: &Self, hasher: &mut H) where H: HasherHashes the receiver into the provided hasher
fn len(self: &Self) -> usizeReturn the number of messages in the queue or 0 if channel is disconnected.
fn is_empty(self: &Self) -> boolReturn false is channel has no queued messages, true otherwise.
impl<T> Any for UnboundedSender<T>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for UnboundedSender<T>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for UnboundedSender<T>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> Clone for UnboundedSender<T>
fn clone(self: &Self) -> Self
impl<T> CloneToUninit for UnboundedSender<T>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> Debug for UnboundedSender<T>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<T> Freeze for UnboundedSender<T>
impl<T> From for UnboundedSender<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> RefUnwindSafe for UnboundedSender<T>
impl<T> Send for UnboundedSender<T>
impl<T> Sink for UnboundedSender<T>
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>fn start_send(self: Pin<&mut Self>, msg: T) -> Result<(), <Self as >::Error>fn poll_flush(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>fn poll_close(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>
impl<T> Sync for UnboundedSender<T>
impl<T> ToOwned for UnboundedSender<T>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> Unpin for UnboundedSender<T>
impl<T> UnsafeUnpin for UnboundedSender<T>
impl<T> UnwindSafe for UnboundedSender<T>
impl<T, U> Into for UnboundedSender<T>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for UnboundedSender<T>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for UnboundedSender<T>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>