Trait Task

Source
pub trait Task: Send {
    // Required methods
    fn interval(&self) -> Option<Duration>;
    fn run<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        ctx: &'life1 mut HeadlessContext,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn interval(&self) -> Option<Duration>

Source

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

Implementors§