pub enum ValidationErrorKind {
Show 46 variants
UnknownTypeIdx {
idx: TypeIdx,
},
UnknownFuncIdx {
idx: FuncIdx,
},
UndeclaredFuncRef {
idx: FuncIdx,
},
UnknownLocalIdx {
idx: LocalIdx,
},
UninitializedLocal {
idx: LocalIdx,
},
UnknownGlobalIdx {
idx: GlobalIdx,
available: u32,
},
UnknownTableIdx {
idx: TableIdx,
available: u32,
},
UnknownMemIdx {
idx: MemIdx,
available: u32,
},
UnknownDataIdx {
idx: DataIdx,
available: u32,
},
UnknownElemIdx {
idx: ElemIdx,
available: u32,
},
InvalidMemArgAlign {
op: &'static str,
max: u32,
found: u32,
},
InvalidSimdLaneIdx {
op: &'static str,
max: u8,
found: u8,
},
UnknownLabelIdx {
idx: LabelIdx,
},
Decode {
context: DecodeContext,
kind: DecodeErrorKind,
},
InvalidGlobalInitExpr,
NonConstantGlobalInitExpr,
MutableGlobalInInitExpr {
idx: GlobalIdx,
},
ImmutableGlobalSet {
idx: GlobalIdx,
},
GlobalInitTypeMismatch {
expected: ValType,
found: ValType,
},
BranchTypeMismatch {
label: LabelIdx,
expected: Vec<ValType>,
found: Vec<ValType>,
},
InvalidBrOnNonNullTarget {
label: LabelIdx,
found: Vec<ValType>,
},
InconsistentBranchTypes {
expected: Vec<ValType>,
found: Vec<ValType>,
},
UnexpectedElse,
UnexpectedEnd,
UnterminatedControlFrames,
ElseOutsideIf,
MissingElseForResult,
InvalidBlockType {
block_type: BlockType,
},
ControlResultTypeMismatch {
expected: Vec<ValType>,
found: Vec<ValType>,
},
InvalidSelectResultArity {
found: usize,
},
SelectOperandTypeMismatch {
expected: ValType,
found: Vec<ValType>,
},
StackUnderflow {
op: &'static str,
expected: Vec<ValType>,
available: Vec<ValType>,
},
TypeMismatch {
op: &'static str,
expected: ValType,
found: ValType,
},
FunctionResultTypeMismatch {
expected: Vec<ValType>,
found: Vec<ValType>,
full_stack: Vec<ValType>,
},
ResultTypeMismatch {
expected: Vec<ValType>,
found: Vec<ValType>,
},
InvalidStartFunctionType {
params: Vec<ValType>,
results: Vec<ValType>,
},
InvalidElementExpr,
NonConstantElementExpr,
ElementExprTypeMismatch {
expected: ValType,
found: ValType,
},
ElementTableTypeMismatch {
expected: RefType,
found: RefType,
},
InvalidCallIndirectTableType {
expected: RefType,
found: RefType,
},
MissingDataCountSection {
op: &'static str,
},
MemorySizeOutOfRange,
MemoryMinExceedsMax,
TableTypeMismatch,
DuplicateExportName {
name: String,
},
}Expand description
Specific categories of validation errors.
Variants§
UnknownTypeIdx
UnknownFuncIdx
UndeclaredFuncRef
UnknownLocalIdx
UninitializedLocal
UnknownGlobalIdx
UnknownTableIdx
UnknownMemIdx
UnknownDataIdx
UnknownElemIdx
InvalidMemArgAlign
InvalidSimdLaneIdx
UnknownLabelIdx
Decode
InvalidGlobalInitExpr
NonConstantGlobalInitExpr
MutableGlobalInInitExpr
ImmutableGlobalSet
GlobalInitTypeMismatch
BranchTypeMismatch
InvalidBrOnNonNullTarget
InconsistentBranchTypes
UnexpectedElse
UnexpectedEnd
UnterminatedControlFrames
ElseOutsideIf
MissingElseForResult
InvalidBlockType
ControlResultTypeMismatch
InvalidSelectResultArity
SelectOperandTypeMismatch
StackUnderflow
TypeMismatch
FunctionResultTypeMismatch
ResultTypeMismatch
InvalidStartFunctionType
InvalidElementExpr
NonConstantElementExpr
ElementExprTypeMismatch
ElementTableTypeMismatch
InvalidCallIndirectTableType
MissingDataCountSection
MemorySizeOutOfRange
MemoryMinExceedsMax
TableTypeMismatch
A non-nullable-element table without an initializer.
DuplicateExportName
Trait Implementations§
Source§impl Clone for ValidationErrorKind
impl Clone for ValidationErrorKind
Source§fn clone(&self) -> ValidationErrorKind
fn clone(&self) -> ValidationErrorKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidationErrorKind
impl Debug for ValidationErrorKind
Source§impl Display for ValidationErrorKind
impl Display for ValidationErrorKind
impl Eq for ValidationErrorKind
Source§impl From<DecodeError> for ValidationErrorKind
impl From<DecodeError> for ValidationErrorKind
Source§fn from(error: DecodeError) -> Self
fn from(error: DecodeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ValidationErrorKind
impl PartialEq for ValidationErrorKind
impl StructuralPartialEq for ValidationErrorKind
Auto Trait Implementations§
impl Freeze for ValidationErrorKind
impl RefUnwindSafe for ValidationErrorKind
impl Send for ValidationErrorKind
impl Sync for ValidationErrorKind
impl Unpin for ValidationErrorKind
impl UnsafeUnpin for ValidationErrorKind
impl UnwindSafe for ValidationErrorKind
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
Mutably borrows from an owned value. Read more