Trait TaskProcessor

Source
pub trait TaskProcessor<T, O>:
    Send
    + Sync
    + 'static
where T: Clone + Send + Sync + 'static, O: Clone + 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

任务处理器特征 定义了处理任务的基本接口

Required Methods§

Source

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,

Implementors§