pub enum BuildError {
DuplicateTaskId(String),
TaskNotFound(String),
EmptyBranch,
EmptyFork,
MissingBranches {
branch_id: String,
missing_keys: Vec<String>,
},
OrphanBranches {
branch_id: String,
orphan_keys: Vec<String>,
},
InvalidMaxIterations(String),
EmptyWorkflow,
InvalidDuration(String),
DefinitionMismatch {
expected: DefinitionHash,
found: DefinitionHash,
},
MissingDep {
task_id: &'static str,
type_name: &'static str,
},
RegistryDepsConflict {
task_id: &'static str,
},
}Expand description
Errors produced during workflow construction (builder / hydration).
Variants§
DuplicateTaskId(String)
A duplicate task ID was found during workflow building.
TaskNotFound(String)
A referenced task ID was not found in the registry.
EmptyBranch
A branch closure produced an empty sub-builder (no steps added).
EmptyFork
A fork has no branches.
MissingBranches
One or more declared branch keys have no corresponding .branch() call
and no default branch was provided.
Fields
OrphanBranches
One or more .branch() calls use keys not declared in the BranchKey enum.
Fields
InvalidMaxIterations(String)
A loop’s max_iterations was set to zero.
EmptyWorkflow
The workflow has no tasks.
InvalidDuration(String)
A duration value is not finite or is negative.
DefinitionMismatch
The workflow definition hash doesn’t match during hydration.
Fields
expected: DefinitionHashThe expected hash (from current workflow).
found: DefinitionHashThe hash found in the serialized state.
MissingDep
A #[task] requires a dependency that is missing from the Deps
container passed to workflow! { deps: … }.
Emitted by verify_deps codegen at workflow construction time, so the
failure surfaces as a BuildErrors rather than panicking at first task
invocation.
Fields
RegistryDepsConflict
A task auto-registered via workflow! { deps: … } is already present in
the pre-built TaskRegistry passed via workflow! { registry: … }.
Without this check the duplicate registration would be silently deduped, and the resulting task instance would depend on registration order rather than the user’s expressed intent. Surfacing the conflict forces an explicit choice between the two sources.
Trait Implementations§
Source§impl Clone for BuildError
impl Clone for BuildError
Source§fn clone(&self) -> BuildError
fn clone(&self) -> BuildError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BuildError
impl Debug for BuildError
Source§impl Display for BuildError
impl Display for BuildError
Source§impl Error for BuildError
impl Error for BuildError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()