pub trait Task: Send + Sync {
    // Required methods
    fn get_task_id(&self) -> TaskId;
    fn get_task_type(&self) -> TaskType;
    fn get_task_category(&self) -> TaskCategory;
    fn get_task_status<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = TaskStatus> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_task_store<'life0, 'async_trait>(
        &'life0 mut self,
        task_store: Arc<dyn TaskStore>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn start_task<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn pause_task<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stop_task<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_task_detail_status<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = BuckyResult<Vec<u8>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn need_persist(&self) -> bool { ... }
    fn check_and_waiting_stop<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

source

fn get_task_id(&self) -> TaskId

source

fn get_task_type(&self) -> TaskType

source

fn get_task_category(&self) -> TaskCategory

source

fn get_task_status<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = TaskStatus> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn set_task_store<'life0, 'async_trait>( &'life0 mut self, task_store: Arc<dyn TaskStore> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn start_task<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn pause_task<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn stop_task<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = BuckyResult<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_task_detail_status<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = BuckyResult<Vec<u8>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

source

fn need_persist(&self) -> bool

source

fn check_and_waiting_stop<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

source§

impl<R: 'static + Runnable> Task for RunnableTask<R>