TaskFactory

Trait TaskFactory 

Source
pub trait TaskFactory:
    'static
    + Send
    + Sync {
    // Required methods
    fn get_task_type(&self) -> TaskType;
    fn create<'life0, 'life1, 'async_trait>(
        &'life0 self,
        params: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = BuckyResult<Box<dyn Task>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn restore<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        task_status: TaskStatus,
        params: &'life1 [u8],
        data: &'life2 [u8],
    ) -> Pin<Box<dyn Future<Output = BuckyResult<Box<dyn Task>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Methods§

Source

fn get_task_type(&self) -> TaskType

Source

fn create<'life0, 'life1, 'async_trait>( &'life0 self, params: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = BuckyResult<Box<dyn Task>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn restore<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, task_status: TaskStatus, params: &'life1 [u8], data: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = BuckyResult<Box<dyn Task>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§