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:
| Type | Purpose |
|---|---|
BasicTask | run an async closure |
StatefulTask | checkpoint state to crate::storage::Storage |
ConditionalTask | branch based on a predicate |
LoopTask | repeat a body with a break condition |
EventDrivenTask | wait for an event, then run |
Re-exports§
pub use trait::Task;pub use trait::TaskOutput;
Modules§
Structs§
- Basic
Task - A task whose body is an async closure.
- Conditional
Task - A branching task.
- Event
Driven Task - A task that waits for a named event on the
Contextevent bus before running its handler. - Loop
Task - A task that runs
bodyrepeatedly untilbreak_whenreturns true or the iteration count reachesmax_iterations. - Stateful
Task - A task whose checkpoint is loaded before, and saved after, each execution.
- Step
Result - The outcome of one
StatefulTaskstep: a new checkpoint plus the output.