pub trait BackgroundTask: Sync + Send {
// Required method
fn execute<'life0, 'async_trait>(
&'life0 self,
count: u32,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A unified trait for any task that can be run in the background.