pub trait ExecutableAsyncSignal<S>: WorkflowImplementationwhere
S: SignalDefinition,{
// Required method
fn handle(
ctx: WorkflowContext<Self>,
input: <S as SignalDefinition>::Input,
) -> Pin<Box<dyn Future<Output = ()>>>;
// Provided method
fn dispatch(
ctx: WorkflowContext<Self>,
input: Box<dyn Any>,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>>>> { ... }
}Expand description
Trait for executing asynchronous signal handlers on a workflow.
Required Methods§
Sourcefn handle(
ctx: WorkflowContext<Self>,
input: <S as SignalDefinition>::Input,
) -> Pin<Box<dyn Future<Output = ()>>>
fn handle( ctx: WorkflowContext<Self>, input: <S as SignalDefinition>::Input, ) -> Pin<Box<dyn Future<Output = ()>>>
Handle an incoming signal with the given input.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".