pub trait CancelFuturewhere
    Self: Future + Sized,{
    // Provided methods
    fn or_cancel<H: RcLike<CancelHandle>>(
        self,
        cancel_handle: H
    ) -> Cancelable<Self>  { ... }
    fn or_abort<H: RcLike<CancelHandle>>(
        self,
        cancel_handle: H
    ) -> Abortable<Self>
       where Self: Unpin { ... }
}

Provided Methods§

source

fn or_cancel<H: RcLike<CancelHandle>>( self, cancel_handle: H ) -> Cancelable<Self>

source

fn or_abort<H: RcLike<CancelHandle>>(self, cancel_handle: H) -> Abortable<Self>where Self: Unpin,

For unpinnable futures, returns the future on cancellation rather than an error.

Implementors§

source§

impl<F> CancelFuture for Fwhere F: Future,