Skip to main content

dag_executor/tasks/
mod.rs

1//! Task abstraction and built-in task types.
2//!
3//! All tasks implement the [`Task`] trait. The crate ships five ready-made
4//! implementations covering common workflow shapes:
5//!
6//! | Type | Purpose |
7//! |------|---------|
8//! | [`BasicTask`] | run an async closure |
9//! | [`StatefulTask`] | checkpoint state to [`crate::storage::Storage`] |
10//! | [`ConditionalTask`] | branch based on a predicate |
11//! | [`LoopTask`] | repeat a body with a break condition |
12//! | [`EventDrivenTask`] | wait for an event, then run |
13
14mod basic;
15mod conditional;
16mod event_driven;
17mod loop_task;
18mod stateful;
19// `trait` is a reserved word, so the module is a raw identifier.
20#[path = "trait.rs"]
21pub mod r#trait;
22
23pub use basic::BasicTask;
24pub use conditional::ConditionalTask;
25pub use event_driven::EventDrivenTask;
26pub use loop_task::LoopTask;
27pub use r#trait::{Task, TaskOutput};
28pub use stateful::{StatefulTask, StepResult};