#[non_exhaustive]pub enum HaltOn {
Never,
Failure,
}Expand description
When a task’s own outcome ends the workflow — the outcome complement of
Task::terminal.
Authored as a string on a task: "halt_on": "failure". Absent means
Self::Never, so every workflow written before this existed is unchanged.
#[non_exhaustive]: further modes (a status range, say) would otherwise
break every downstream match. Match with a _ arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Never
Never halt on outcome. The default, and the behaviour of every task that
does not mention halt_on.
Failure
Halt once this task has run and failed — a recorded status of 400 or
above, which covers the validation built-in’s 400, any handler
returning TaskOutcome::Status
in that range, and a handler returning Err (recorded as 500).
TaskOutcome::Skip
records nothing and never halts, and
TaskOutcome::Halt
carries HALT_STATUS_CODE (299), below the threshold — it halts on its
own account, not through this flag.
There is no "always": Task::terminal already spells that.