pub trait TaskProcessor<T, O>:
Send
+ Sync
+ 'static{
// Required method
fn process<'life0, 'async_trait>(
&'life0 self,
task: T,
) -> Pin<Box<dyn Future<Output = Result<O, ProcessorError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
任务处理器特征 定义了处理任务的基本接口