pub struct MeteredSender<T> { /* private fields */ }
Expand description
Oneshot sender, created by channel
.
Implementations§
source§impl<T> MeteredSender<T>
impl<T> MeteredSender<T>
sourcepub fn poll_canceled(&mut self, ctx: &mut Context<'_>) -> Poll<()>
pub fn poll_canceled(&mut self, ctx: &mut Context<'_>) -> Poll<()>
Poll if the thing is already canceled.
sourcepub fn cancellation(&mut self) -> Cancellation<'_, (CoarseInstant, T)>
pub fn cancellation(&mut self) -> Cancellation<'_, (CoarseInstant, T)>
Access the cancellation object.
sourcepub fn is_canceled(&self) -> bool
pub fn is_canceled(&self) -> bool
Check the cancellation state.
sourcepub fn is_connected_to(&self, receiver: &MeteredReceiver<T>) -> bool
pub fn is_connected_to(&self, receiver: &MeteredReceiver<T>) -> bool
Verify if the receiver
is connected to the sender
Self
.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for MeteredSender<T>
impl<T> Send for MeteredSender<T>where T: Send,
impl<T> Sync for MeteredSender<T>where T: Send,
impl<T> Unpin for MeteredSender<T>
impl<T> !UnwindSafe for MeteredSender<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more