pub enum TaskOutcome {
Success,
Status(u16),
Skip,
Halt,
}Expand description
Outcome of a single task execution.
Returned by AsyncFunctionHandler::execute and by the engine’s internal
sync-builtin dispatch path. The workflow executor uses the variant to
decide whether to continue, skip the audit trail, or halt the workflow.
HTTP-like status semantics (preserved from v3 and earlier):
- status
200— normal completion - status
400..500— logged as a warning, workflow continues - status
500..— recorded; fails the workflow unless the task or workflow hascontinue_on_error = true
Variants§
Success
Normal completion. Audit trail records status 200 and the workflow
continues with the next task.
Status(u16)
Completion with an explicit HTTP-like status code. Audit trail records
the supplied status. Codes in the 400..500 range log a warning;
codes >= 500 fail the workflow unless continue_on_error is set.
Skip
Skip recording an audit trail entry for this task; continue with the next task. Used by filter gates that intentionally no-op when their condition does not match.
Halt
Record the audit trail (status HALT_STATUS_CODE) and stop further
tasks in the current workflow. Subsequent workflows registered on the
same engine still process this message normally.
Implementations§
Source§impl TaskOutcome
impl TaskOutcome
Sourcepub fn audit_status(self) -> Option<u16>
pub fn audit_status(self) -> Option<u16>
HTTP-like status code that will be stamped on the audit trail entry
for this outcome. Skip returns None since no audit entry is
recorded in that case.
Sourcepub fn halts_workflow(self) -> bool
pub fn halts_workflow(self) -> bool
Whether the workflow executor should halt further tasks in this workflow after observing this outcome.
Trait Implementations§
Source§impl Clone for TaskOutcome
impl Clone for TaskOutcome
Source§fn clone(&self) -> TaskOutcome
fn clone(&self) -> TaskOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TaskOutcome
Source§impl Debug for TaskOutcome
impl Debug for TaskOutcome
Source§impl Default for TaskOutcome
impl Default for TaskOutcome
Source§fn default() -> TaskOutcome
fn default() -> TaskOutcome
impl Eq for TaskOutcome
Source§impl PartialEq for TaskOutcome
impl PartialEq for TaskOutcome
Source§fn eq(&self, other: &TaskOutcome) -> bool
fn eq(&self, other: &TaskOutcome) -> bool
self and other values to be equal, and is used by ==.