taktora_executor/control_flow.rs
1//! Return type for [`crate::ExecutableItem::execute`].
2
3use crate::error::ItemError;
4
5/// What the executor should do after an item runs successfully.
6#[derive(Debug, Clone, Copy, Eq, PartialEq)]
7#[non_exhaustive]
8pub enum ControlFlow {
9 /// Continue scheduling normally.
10 Continue,
11 /// Abort the enclosing chain or graph (no further items dispatched).
12 StopChain,
13}
14
15/// Return type of [`crate::ExecutableItem::execute`].
16pub type ExecuteResult = Result<ControlFlow, ItemError>;