pub enum ValidationError {
Show 15 variants
NoInputs,
NoRulesApplied,
InputConfidenceOutOfRange(f64),
InputConfidenceNaN,
OutputConfidenceInvalid(f64),
TierOutOfRange(u8),
ConfidenceInflation {
output: f64,
max_input: f64,
},
TierInflation {
output: u8,
ceiling: u8,
limiting_class: RuleClass,
},
EpistemicMismatch {
declared: EpistemicStatus,
expected: EpistemicStatus,
},
RuleClassMismatch {
rule: Rule,
declared: RuleClass,
canonical: RuleClass,
},
BindingStatusMismatch {
declared: BindingStatus,
expected: BindingStatus,
},
TypeClassIncompatible {
type_name: &'static str,
permitted: &'static [RuleClass],
rejected: RuleClass,
},
ProvenAuthorityMissingArtifact,
ImposedAuthorityMissingInterception,
EmptyClassSet,
}Expand description
Errors the validator can return. Each variant names the specific §9 invariant it violates so debug logs and tests can distinguish them.
Variants§
NoInputs
inputs is empty (Property 4 — ADG presence).
NoRulesApplied
rules_applied is empty (Property 4 — ADG presence).
InputConfidenceOutOfRange(f64)
An input’s confidence is outside [0, 1].
InputConfidenceNaN
An input’s confidence is NaN.
OutputConfidenceInvalid(f64)
output.confidence is outside [0, 1] or NaN.
TierOutOfRange(u8)
output.tier is outside [0, 4].
ConfidenceInflation
Property 1 — output.confidence > max(inputs.confidence).
TierInflation
Property 2 — output.tier > min(class_tier_ceiling).
Fields
EpistemicMismatch
Property 3 — output.epistemic_status is not the deterministic image
of the rule-class set.
Fields
declared: EpistemicStatusDeclared epistemic_status.
expected: EpistemicStatusStatus the canonical mapping demands.
RuleClassMismatch
Property 5 — a rule’s declared class does not match the canonical
rule -> class mapping.
Fields
BindingStatusMismatch
binding_status does not match the rules’ implications.
Fields
declared: BindingStatusDeclared binding_status.
expected: BindingStatusStatus the canonical mapping demands.
TypeClassIncompatible
Type-class compatibility violation — the typed authority’s permitted rule-class envelope was exceeded.
Fields
ProvenAuthorityMissingArtifact
ProvenAuthority was constructed without a verified-signature artifact.
ImposedAuthorityMissingInterception
ImposedAuthority requires the IMPOSED_INTERCEPTION rule-class to
have fired in its derivation.
EmptyClassSet
The empty-class-set case from the ADG mapping table.
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()
Source§impl PartialEq for ValidationError
impl PartialEq for ValidationError
Source§fn eq(&self, other: &ValidationError) -> bool
fn eq(&self, other: &ValidationError) -> bool
self and other values to be equal, and is used by ==.