Skip to main content

ExecutableSyncSignal

Trait ExecutableSyncSignal 

Source
pub trait ExecutableSyncSignal<S: SignalDefinition>: WorkflowImplementation {
    // Required method
    fn handle(&mut self, ctx: &mut SyncWorkflowContext<Self>, input: S::Input);

    // Provided method
    fn dispatch(
        ctx: WorkflowContext<Self>,
        input: Box<dyn Any>,
    ) -> LocalBoxFuture<'static, Result<(), WorkflowError>> { ... }
}
Expand description

Trait for executing synchronous signal handlers on a workflow.

Required Methods§

Source

fn handle(&mut self, ctx: &mut SyncWorkflowContext<Self>, input: S::Input)

Handle an incoming signal with the given input.

Provided Methods§

Source

fn dispatch( ctx: WorkflowContext<Self>, input: Box<dyn Any>, ) -> LocalBoxFuture<'static, Result<(), WorkflowError>>

Dispatch the signal with an already decoded input.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§