Skip to main content

OrchestrationHandler

Trait OrchestrationHandler 

Source
pub trait OrchestrationHandler: Send + Sync {
    // Required method
    fn invoke<'life0, 'async_trait>(
        &'life0 self,
        ctx: OrchestrationContext,
        input: String,
    ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait implemented by orchestration handlers that can be invoked by the runtime.

Required Methods§

Source

fn invoke<'life0, 'async_trait>( &'life0 self, ctx: OrchestrationContext, input: String, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<F, Fut> OrchestrationHandler for FnOrchestration<F, Fut>
where F: Fn(OrchestrationContext, String) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<String, String>> + Send + 'static,