Skip to main content

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,

Implementations on Foreign Types§

Source§

impl BackgroundTask for Arc<JwksSource>

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,

Source§

impl BackgroundTask for Arc<SupergraphBackgroundLoader>

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,

Source§

impl BackgroundTask for UsageAgent

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§