Skip to main content

Module tasks

Module tasks 

Source
Expand description

Task abstraction and built-in task types.

All tasks implement the Task trait. The crate ships five ready-made implementations covering common workflow shapes:

TypePurpose
BasicTaskrun an async closure
StatefulTaskcheckpoint state to crate::storage::Storage
ConditionalTaskbranch based on a predicate
LoopTaskrepeat a body with a break condition
EventDrivenTaskwait for an event, then run

Re-exports§

pub use trait::Task;
pub use trait::TaskOutput;

Modules§

trait
The core Task abstraction.

Structs§

BasicTask
A task whose body is an async closure.
ConditionalTask
A branching task.
EventDrivenTask
A task that waits for a named event on the Context event bus before running its handler.
LoopTask
A task that runs body repeatedly until break_when returns true or the iteration count reaches max_iterations.
StatefulTask
A task whose checkpoint is loaded before, and saved after, each execution.
StepResult
The outcome of one StatefulTask step: a new checkpoint plus the output.