Trait deno_core::CancelFuture

source ·
pub trait CancelFuture
where 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.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<F> CancelFuture for F
where F: Future,