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§
Sourcefn handle(&mut self, ctx: &mut SyncWorkflowContext<Self>, input: S::Input)
fn handle(&mut self, ctx: &mut SyncWorkflowContext<Self>, input: S::Input)
Handle an incoming signal with the given input.
Provided Methods§
Sourcefn dispatch(
ctx: WorkflowContext<Self>,
input: Box<dyn Any>,
) -> LocalBoxFuture<'static, Result<(), WorkflowError>>
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".