pub trait AsyncTask<Item, Context, Client, TaskResult, TaskError>:
Send
+ Sync
+ 'staticwhere
Item: Send + 'static,
Context: Send + Sync + 'static,
Client: Send + Sync + 'static,
TaskResult: Send + 'static,
TaskError: Debug + Send + 'static,{
type ItemId: Send + Debug + Clone;
// Required method
fn process<'life0, 'life1, 'async_trait>(
&'life0 self,
worker_id: usize,
client: &'life1 Client,
item: Item,
) -> Pin<Box<dyn Future<Output = Result<(Self::ItemId, TaskResult), (TaskError, Item)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}