BackgroundTask

Trait BackgroundTask 

Source
pub trait BackgroundTask: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn run<'life0, 'async_trait>(
        &'life0 self,
        token: CancellationToken,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn id(&self) -> &str

Source

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

Implementors§