pub trait Task: Send + Sync {
// Required methods
fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = TaskResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn task_type(&self) -> &'static str;
fn task_id(&self) -> String;
// Provided methods
fn estimated_duration(&self) -> Option<Duration> { ... }
fn description(&self) -> String { ... }
}Expand description
Trait defining a unit of work