common_runtime

Trait TaskFunction

source
pub trait TaskFunction<E> {
    // Required methods
    fn call<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn name(&self) -> &str;
}
Expand description

Task to execute repeatedly.

Required Methods§

source

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

Invoke the task.

source

fn name(&self) -> &str

Name of the task.

Implementors§