Struct WeakUnboundedSender
struct WeakUnboundedSender<T> { ... }
An unbounded sender that does not prevent the channel from being closed.
If all UnboundedSender instances of a channel were dropped and only
WeakUnboundedSender instances remain, the channel is closed.
In order to send messages, the WeakUnboundedSender needs to be upgraded using
WeakUnboundedSender::upgrade, which returns Option<UnboundedSender>. It returns None
if all UnboundedSenders have been dropped, and otherwise it returns an UnboundedSender.
Examples
use unbounded_channel;
async
Implementations
impl<T> WeakUnboundedSender<T>
fn upgrade(self: &Self) -> Option<UnboundedSender<T>>Tries to convert a
WeakUnboundedSenderinto anUnboundedSender. This will returnSomeif there are otherSenderinstances alive and the channel wasn't previously dropped, otherwiseNoneis returned.fn strong_count(self: &Self) -> usizeReturns the number of
UnboundedSenderhandles.fn weak_count(self: &Self) -> usizeReturns the number of
WeakUnboundedSenderhandles.
impl<T> Any for WeakUnboundedSender<T>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for WeakUnboundedSender<T>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for WeakUnboundedSender<T>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> Clone for WeakUnboundedSender<T>
fn clone(self: &Self) -> Self
impl<T> CloneToUninit for WeakUnboundedSender<T>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> Debug for WeakUnboundedSender<T>
fn fmt(self: &Self, fmt: &mut Formatter<'_>) -> Result
impl<T> Drop for WeakUnboundedSender<T>
fn drop(self: &mut Self)
impl<T> Freeze for WeakUnboundedSender<T>
impl<T> From for WeakUnboundedSender<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> RefUnwindSafe for WeakUnboundedSender<T>
impl<T> Send for WeakUnboundedSender<T>
impl<T> Sync for WeakUnboundedSender<T>
impl<T> ToOwned for WeakUnboundedSender<T>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> Unpin for WeakUnboundedSender<T>
impl<T> UnsafeUnpin for WeakUnboundedSender<T>
impl<T> UnwindSafe for WeakUnboundedSender<T>
impl<T, U> Into for WeakUnboundedSender<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 WeakUnboundedSender<T>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for WeakUnboundedSender<T>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>