Trait CancellableJob

Source
pub trait CancellableJob: Job {
    // Required method
    fn execute_with_cancellation<'life0, 'life1, 'async_trait>(
        &'life0 self,
        token: &'life1 CancellationToken,
    ) -> Pin<Box<dyn Future<Output = JobResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Extended job trait with cancellation support

Required Methods§

Source

fn execute_with_cancellation<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 CancellationToken, ) -> Pin<Box<dyn Future<Output = JobResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute the job with cancellation support

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§