pub struct WorkflowRunner<S: WorkflowStateStore, E: StepExecutor, K: EventSink = NoopEventSink> {
pub store: S,
pub executor: E,
pub events: K,
}Expand description
Runs workflows step by step, handling sequential and parallel execution.
Fields§
§store: S§executor: E§events: KImplementations§
Source§impl<S: WorkflowStateStore, E: StepExecutor> WorkflowRunner<S, E, NoopEventSink>
impl<S: WorkflowStateStore, E: StepExecutor> WorkflowRunner<S, E, NoopEventSink>
Source§impl<S: WorkflowStateStore, E: StepExecutor, K: EventSink> WorkflowRunner<S, E, K>
impl<S: WorkflowStateStore, E: StepExecutor, K: EventSink> WorkflowRunner<S, E, K>
pub fn with_events(store: S, executor: E, events: K) -> Self
Sourcepub async fn run_next(
&self,
workflow_id: &str,
) -> Result<Vec<(String, StepResult)>, String>
pub async fn run_next( &self, workflow_id: &str, ) -> Result<Vec<(String, StepResult)>, String>
Run the next runnable step(s). Handles both sequential and parallel. Returns the results of executed steps.
Sourcepub async fn run_all(&self, workflow_id: &str) -> Result<WorkflowStatus, String>
pub async fn run_all(&self, workflow_id: &str) -> Result<WorkflowStatus, String>
Run all steps until completion, failure, blocked, or pause.
Auto Trait Implementations§
impl<S, E, K> Freeze for WorkflowRunner<S, E, K>
impl<S, E, K> RefUnwindSafe for WorkflowRunner<S, E, K>
impl<S, E, K> Send for WorkflowRunner<S, E, K>
impl<S, E, K> Sync for WorkflowRunner<S, E, K>
impl<S, E, K> Unpin for WorkflowRunner<S, E, K>
impl<S, E, K> UnsafeUnpin for WorkflowRunner<S, E, K>
impl<S, E, K> UnwindSafe for WorkflowRunner<S, E, K>
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