Skip to main content

TaskHandler

Trait TaskHandler 

Source
pub trait TaskHandler: Send + Sync {
    // Required method
    fn handle_task<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        description: &'life1 str,
        args: &'life2 HashMap<String, String>,
    ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait for handling tasks dispatched by the orchestrator.

Implementations receive a task description and arguments, execute the work, and return a string result or an error message.

Required Methods§

Source

fn handle_task<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, description: &'life1 str, args: &'life2 HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§