pub trait WorkflowDefinition: Send + Sync {
type Input: Serialize + DeserializeOwned + Send + Sync;
type Output: Serialize + DeserializeOwned + Send + Sync;
// Required methods
fn workflow_type() -> &'static str;
fn run(
&self,
ctx: WorkflowContext,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, CoreError>> + Send + '_>>;
}Expand description
A trait for defining workflow types
Workflows are the main unit of execution in Sidebyside. They define the orchestration logic that coordinates activities and decision points.
Required Associated Types§
Required Methods§
Sourcefn workflow_type() -> &'static str
fn workflow_type() -> &'static str
Get the workflow type name
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.