#[non_exhaustive]pub enum ValidationError {
Show 20 variants
InvalidWeaveId {
weave_id: String,
reason: &'static str,
},
InvalidKnotId {
knot_id: String,
reason: &'static str,
},
EmptyWeave {
weave_id: String,
},
DuplicateKnotId {
knot_id: String,
},
UnknownKnot {
knot_id: String,
},
UnknownPort {
knot_id: String,
port: String,
expected: Vec<String>,
},
WrongPortDirection {
knot_id: String,
port: String,
expected: PortDir,
actual: PortDir,
},
FanIn {
knot_id: String,
port: String,
},
Cycle {
at_knot: Option<String>,
},
UnconnectedRequired {
knot_id: String,
port: String,
},
BudgetExceeded {
metric: &'static str,
actual: u32,
limit: u32,
at_knot: Option<String>,
},
NumericMismatch {
expected: NumericPath,
actual: NumericPath,
},
SignalDomainMismatch {
from_knot: String,
from_port: String,
from_domain: SignalDomain,
to_knot: String,
to_port: String,
to_domain: SignalDomain,
},
UnresolvedSignalDomain {
knot_id: String,
port: String,
},
InvalidParameter {
knot_id: String,
parameter: &'static str,
reason: &'static str,
},
RepresentationOverflow {
what: &'static str,
actual: usize,
limit: usize,
},
InvalidPatternId {
pattern_id: String,
reason: &'static str,
},
DuplicateExport {
export: String,
},
DuplicatePatternInput {
knot_id: String,
port: String,
first_export: String,
duplicate_export: String,
},
PatternInputAlreadyConnected {
export: String,
knot_id: String,
port: String,
},
}Expand description
A graph definition is structurally invalid and cannot become a crate::Weave.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidWeaveId
validate_def rejects an empty weave id.
Fields
InvalidKnotId
validate_def or Pattern::try_from rejects a knot id that breaks naming rules.
Fields
EmptyWeave
validate_def finds no knots in the weave definition.
DuplicateKnotId
validate_def finds two knots with the same id.
UnknownKnot
A thread or pattern export references a knot id not present in the definition.
UnknownPort
A thread or pattern export names a port that the knot kind does not declare.
Fields
WrongPortDirection
A referenced port exists but is used as the wrong direction (in vs out).
Fields
FanIn
Two threads target the same input port on one knot.
Fields
Cycle
The directed thread graph contains a cycle.
UnconnectedRequired
A required input port has no thread and is not satisfied by a pattern export.
Fields
BudgetExceeded
validate or validate_report exceeds a hard resource budget.
Fields
NumericMismatch
The weave’s numeric path does not match the compiled crate feature.
Fields
expected: NumericPathNumeric path required by the compiled build.
actual: NumericPathNumeric path stored on the weave definition.
SignalDomainMismatch
Connected ports or tied variable ports resolve to incompatible signal domains.
Fields
from_domain: SignalDomainDomain inferred or fixed on the source side.
to_domain: SignalDomainDomain required or inferred on the sink side.
UnresolvedSignalDomain
Active port domain inference could not fix a domain before validation finished.
Fields
InvalidParameter
A knot kind parameter or port constraint fails catalog rules.
Fields
RepresentationOverflow
Knot or thread count exceeds the dense u16 representation limit.
Fields
InvalidPatternId
Pattern::try_from rejects the pattern catalog id.
Fields
DuplicateExport
Pattern::try_from finds two exports with the same name.
DuplicatePatternInput
Two input exports map to the same inner physical port.
Fields
PatternInputAlreadyConnected
An input export targets a port already wired inside the pattern.
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
impl Eq for ValidationError
Source§impl Error for ValidationError
Available on crate feature std only.
impl Error for ValidationError
std only.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()