Struct Cancellation
#[must_use = "futures do nothing unless you `.await` or poll them"]
pub struct Cancellation<'a, T> { /* private fields */ }
A future that resolves when the receiving end of a channel has hung up.
This is an .await-friendly interface around poll_canceled.
Trait Implementations
impl<'a, T: Debug> Debug for Cancellation<'a, T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<T> Future for Cancellation<'_, T>
type Output = ();fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()>
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for Cancellation<'a, T>
impl<'a, T> !UnwindSafe for Cancellation<'a, T>
impl<'a, T> Freeze for Cancellation<'a, T>
where
&'a mut Sender<T>: Freeze,
impl<'a, T> Send for Cancellation<'a, T>
where
&'a mut Sender<T>: Send,
impl<'a, T> Sync for Cancellation<'a, T>
where
&'a mut Sender<T>: Sync,
impl<'a, T> Unpin for Cancellation<'a, T>
where
&'a mut Sender<T>: Unpin,
impl<'a, T> UnsafeUnpin for Cancellation<'a, T>
where
&'a mut Sender<T>: UnsafeUnpin,
Blanket Implementations
impl<F> IntoFuture for Cancellation<'a, T>
where
F: Future,
type Output = <F as Future>::Output;type IntoFuture = F;fn into_future(self) -> <F as IntoFuture>::IntoFuture
impl<T> Any for Cancellation<'a, T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Cancellation<'a, T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Cancellation<'a, T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for Cancellation<'a, T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for Cancellation<'a, T>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Cancellation<'a, T>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Cancellation<'a, T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>