#[non_exhaustive]pub enum ValidationError {
Show 22 variants
SchemaVersion {
found: u16,
},
TooLarge,
InputWidthOutOfRange {
slot: usize,
width: u16,
},
NodeWidthOutOfRange {
at: u32,
width: u16,
},
Arity {
at: u32,
expected: usize,
found: usize,
},
OperandOutOfRange {
at: u32,
operand: u32,
},
NonCanonicalEdge {
at: u32,
operand: u32,
},
OperandTyping {
at: u32,
reason: &'static str,
},
OutputWidth {
at: u32,
reason: &'static str,
},
ConstantBytes {
at: u32,
expected: usize,
found: usize,
},
InputSlotOutOfRange {
at: u32,
slot: u16,
},
InputWidthMismatch {
at: u32,
declared: u16,
input: u16,
},
LookupKeyWidth {
at: u32,
expected: u16,
found: u16,
},
LookupBound {
at: u32,
reason: &'static str,
},
OutputRefOutOfRange {
which: &'static str,
id: u32,
},
OutputNotPredicate {
which: &'static str,
width: u16,
},
RefusalCodeTooWide {
width: u16,
},
Limit(LimitViolation),
CertificateMismatch,
MalformedEncoding,
NonCanonicalEncoding,
Encoding,
}Expand description
Why a program failed validation. The validator fails closed on the FIRST fault; each variant names a malformed class its red fixtures prove it catches.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SchemaVersion
The program declares a schema version other than the frozen one.
TooLarge
The node count is not u32-indexable.
InputWidthOutOfRange
A declared input lane width is outside 1 ..= MAX_WIDTH.
NodeWidthOutOfRange
A node’s output width is outside 1 ..= MAX_WIDTH.
Arity
A node’s fan-in does not match its op’s frozen arity.
OperandOutOfRange
An operand references a node id outside the array.
NonCanonicalEdge
An operand references the node itself or a later node.
OperandTyping
Operands that must share (or relate by) a width do not.
OutputWidth
A node’s declared output width disagrees with what its op produces.
ConstantBytes
A constant’s byte length does not match its declared width.
Fields
InputSlotOutOfRange
An NodeOp::Input references a slot outside the input declaration.
InputWidthMismatch
An input node’s declared width disagrees with the declared input lane.
Fields
LookupKeyWidth
A lookup’s key operand width disagrees with the table’s key width.
Fields
LookupBound
A lookup table is over-large or has a mis-sized entry.
OutputRefOutOfRange
A declared output references a node id outside the array.
Fields
OutputNotPredicate
A predicate output references a non-1-bit lane.
RefusalCodeTooWide
The refusal-code lane is wider than a u64.
Limit(LimitViolation)
The program exceeds the structural limits.
CertificateMismatch
A re-derived certificate did not match the claimed one.
MalformedEncoding
The bytes did not decode to a program.
NonCanonicalEncoding
The bytes decoded but are not the program’s canonical encoding.
Encoding
Canonical re-encoding failed.
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
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 ==.impl StructuralPartialEq for ValidationError
Auto Trait Implementations§
impl Freeze for ValidationError
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnsafeUnpin for ValidationError
impl UnwindSafe for ValidationError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more