#[non_exhaustive]pub enum ValidationError {
Show 20 variants
NoEntryPoint,
InvalidEntryPoint(NodeId),
InvalidEdgeSource {
edge: EdgeId,
node: NodeId,
},
InvalidEdgeTarget {
edge: EdgeId,
node: NodeId,
},
MissingPredicate {
node: NodeId,
name: &'static str,
},
MissingBranch {
node: NodeId,
name: &'static str,
branch: &'static str,
},
InvalidBranchTarget {
node: NodeId,
branch: &'static str,
target: NodeId,
},
MissingDiscriminator {
node: NodeId,
name: &'static str,
},
EmptySwitch {
node: NodeId,
name: &'static str,
},
InvalidCaseTarget {
node: NodeId,
case: &'static str,
target: NodeId,
},
InvalidDefaultTarget {
node: NodeId,
target: NodeId,
},
EmptyParallel {
node: NodeId,
name: &'static str,
},
NoTerminationCondition {
node: NodeId,
name: &'static str,
},
EmptyLoopBody {
node: NodeId,
name: &'static str,
},
InvalidLoopBody {
node: NodeId,
target: NodeId,
},
LoopPredicateOutputNotProduced {
node: NodeId,
name: &'static str,
expected_output: &'static str,
},
MissingEdgeRequirement {
node: NodeId,
name: &'static str,
requirement: &'static str,
},
EmptyScopeGraph {
node: NodeId,
name: &'static str,
},
ScopeGraphNoEntryPoint {
node: NodeId,
name: &'static str,
},
ScopeGraphInvalid {
node: NodeId,
name: &'static str,
inner: Box<ValidationError>,
},
}Expand description
Errors that can occur during graph validation.
These errors are detected at build time (when calling Graph::validate)
before the graph is executed, allowing early detection of structural issues.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoEntryPoint
The graph has no entry point.
InvalidEntryPoint(NodeId)
The entry point references an invalid node.
InvalidEdgeSource
An edge’s source node doesn’t exist.
InvalidEdgeTarget
An edge’s target node doesn’t exist.
MissingPredicate
A decision node is missing its predicate.
MissingBranch
A decision node is missing a branch target.
Fields
InvalidBranchTarget
A branch target references an invalid node.
Fields
MissingDiscriminator
A switch node is missing its discriminator.
EmptySwitch
A switch node has no cases and no default.
InvalidCaseTarget
A switch case target references an invalid node.
Fields
InvalidDefaultTarget
A switch default target references an invalid node.
EmptyParallel
A parallel node has no branches.
NoTerminationCondition
A loop node has no termination condition.
EmptyLoopBody
A loop node has no body.
InvalidLoopBody
A loop body entry references an invalid node.
LoopPredicateOutputNotProduced
A loop’s termination predicate reads an output type that no system in the loop body produces.
Fields
MissingEdgeRequirement
A system requires a specific edge type but is not reachable via that edge.
For example, a system using CaughtError must be the target of an
error edge; placing it on a normal sequential path is a wiring mistake.
Fields
EmptyScopeGraph
A scope node contains an empty graph.
ScopeGraphNoEntryPoint
A scope node’s embedded graph has no entry point.
ScopeGraphInvalid
A scope node’s embedded graph has a validation error.
Trait Implementations§
Source§impl Clone for ValidationError
impl Clone for ValidationError
Source§fn clone(&self) -> ValidationError
fn clone(&self) -> ValidationError
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 ValidationError
impl Debug for ValidationError
Source§impl Display for ValidationError
impl Display for ValidationError
Source§impl Error for ValidationError
impl Error for ValidationError
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()