TaskCallback

Trait TaskCallback 

Source
pub trait TaskCallback: Send + Sync {
    // Required method
    fn run<'life0, 'async_trait>(
        &'life0 self,
        task_scheduled_time: DateTime<Utc>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for a task that can be run periodically by the cron service.

Required Methods§

Source

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

Runs the task at the scheduled time.

Implementors§