pub struct Workflow { /* private fields */ }Expand description
A compiled workflow ready for execution.
Created by WorkflowBuilder::build. Execute with run.
Note: Debug is implemented manually because the handler functions
are not Debug.
Implementations§
Source§impl Workflow
impl Workflow
Sourcepub async fn run(&self) -> Result<WorkflowResult>
pub async fn run(&self) -> Result<WorkflowResult>
Execute the workflow.
Entry nodes (no incoming edges) run first. Downstream nodes run as
their dependencies complete. Nodes sharing the same set of completed
dependencies run concurrently via tokio::spawn.
Sourcepub async fn run_with_context(
&self,
ctx: WorkflowContext,
) -> Result<WorkflowResult>
pub async fn run_with_context( &self, ctx: WorkflowContext, ) -> Result<WorkflowResult>
Execute the workflow with a pre-populated context.
Sourcepub fn entry_nodes(&self) -> &[String]
pub fn entry_nodes(&self) -> &[String]
Get the entry node names.
Sourcepub fn node_names(&self) -> &HashSet<String>
pub fn node_names(&self) -> &HashSet<String>
Get all node names.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Workflow
impl !RefUnwindSafe for Workflow
impl Send for Workflow
impl Sync for Workflow
impl Unpin for Workflow
impl UnsafeUnpin for Workflow
impl !UnwindSafe 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