pub struct Workflow { /* private fields */ }Expand description
Validated, immutable workflow definition.
Implementations§
Source§impl Workflow
impl Workflow
Sourcepub fn run<'a>(
&'a self,
input: impl Into<Value> + Send + 'a,
run: &'a RunContext,
) -> WorkflowFuture<'a, Result<WorkflowOutcome, WorkflowError>>
pub fn run<'a>( &'a self, input: impl Into<Value> + Send + 'a, run: &'a RunContext, ) -> WorkflowFuture<'a, Result<WorkflowOutcome, WorkflowError>>
Executes this workflow from the first node.
Sourcepub fn run_checkpointed<'a>(
&'a self,
input: impl Into<Value> + Send + 'a,
run: &'a RunContext,
checkpoint: &'a WorkflowCheckpoint,
) -> WorkflowFuture<'a, Result<WorkflowOutcome, WorkflowError>>
pub fn run_checkpointed<'a>( &'a self, input: impl Into<Value> + Send + 'a, run: &'a RunContext, checkpoint: &'a WorkflowCheckpoint, ) -> WorkflowFuture<'a, Result<WorkflowOutcome, WorkflowError>>
Executes with write-ahead workflow checkpoint persistence.
Sourcepub fn resume<'a>(
&'a self,
checkpoint: &'a WorkflowCheckpoint,
run: &'a RunContext,
policy: WorkflowResumePolicy,
) -> WorkflowFuture<'a, Result<WorkflowOutcome, WorkflowError>>
pub fn resume<'a>( &'a self, checkpoint: &'a WorkflowCheckpoint, run: &'a RunContext, policy: WorkflowResumePolicy, ) -> WorkflowFuture<'a, Result<WorkflowOutcome, WorkflowError>>
Resumes a persisted workflow execution.
Source§impl Workflow
impl Workflow
Sourcepub fn builder(name: impl Into<String>) -> WorkflowBuilder
pub fn builder(name: impl Into<String>) -> WorkflowBuilder
Starts a fluent workflow definition.
Sourcepub const fn version(&self) -> u32
pub const fn version(&self) -> u32
Returns the definition version used to validate checkpoints.
Sourcepub fn step_ids(&self) -> impl ExactSizeIterator<Item = &StepId>
pub fn step_ids(&self) -> impl ExactSizeIterator<Item = &StepId>
Returns stable node identifiers in execution order.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Workflow
impl !UnwindSafe for Workflow
impl Freeze for Workflow
impl Send for Workflow
impl Sync for Workflow
impl Unpin for Workflow
impl UnsafeUnpin for Workflow
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more