scuffle_context

Trait ContextFutExt

Source
pub trait ContextFutExt<Fut> {
    // Required method
    fn with_context<'a>(
        self,
        ctx: impl Into<ContextRef<'a>>,
    ) -> FutureWithContext<'a, Fut> 
       where Self: Sized;
}

Required Methods§

Source

fn with_context<'a>( self, ctx: impl Into<ContextRef<'a>>, ) -> FutureWithContext<'a, Fut>
where Self: Sized,

Wraps a future with a context, allowing the future to be cancelled when the context is done

Implementors§