Skip to main content

ForgeWorkflow

Trait ForgeWorkflow 

Source
pub trait ForgeWorkflow:
    Sealed
    + Send
    + Sync
    + 'static {
    type Input: DeserializeOwned + Serialize + Send + Sync;
    type Output: Serialize + Send;

    // Required methods
    fn info() -> WorkflowInfo;
    fn execute(
        ctx: &WorkflowContext,
        input: Self::Input,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Output, ForgeError>> + Send + '_>>;
}
Expand description

Trait for durable workflow handlers.

Required Associated Types§

Required Methods§

Source

fn info() -> WorkflowInfo

Source

fn execute( ctx: &WorkflowContext, input: Self::Input, ) -> Pin<Box<dyn Future<Output = Result<Self::Output, ForgeError>> + Send + '_>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§