Skip to main content

ValidationErrorKind

Enum ValidationErrorKind 

Source
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

Fields

§

UnknownFuncIdx

Fields

§

UndeclaredFuncRef

Fields

§

UnknownLocalIdx

Fields

§

UninitializedLocal

Fields

§

UnknownGlobalIdx

Fields

§available: u32
§

UnknownTableIdx

Fields

§available: u32
§

UnknownMemIdx

Fields

§available: u32
§

UnknownDataIdx

Fields

§available: u32
§

UnknownElemIdx

Fields

§available: u32
§

InvalidMemArgAlign

Fields

§op: &'static str
§max: u32
§found: u32
§

InvalidSimdLaneIdx

Fields

§op: &'static str
§max: u8
§found: u8
§

UnknownLabelIdx

Fields

§

Decode

§

InvalidGlobalInitExpr

§

NonConstantGlobalInitExpr

§

MutableGlobalInInitExpr

Fields

§

ImmutableGlobalSet

Fields

§

GlobalInitTypeMismatch

Fields

§expected: ValType
§found: ValType
§

BranchTypeMismatch

Fields

§label: LabelIdx
§expected: Vec<ValType>
§found: Vec<ValType>
§

InvalidBrOnNonNullTarget

Fields

§label: LabelIdx
§found: Vec<ValType>
§

InconsistentBranchTypes

Fields

§expected: Vec<ValType>
§found: Vec<ValType>
§

UnexpectedElse

§

UnexpectedEnd

§

UnterminatedControlFrames

§

ElseOutsideIf

§

MissingElseForResult

§

InvalidBlockType

Fields

§block_type: BlockType
§

ControlResultTypeMismatch

Fields

§expected: Vec<ValType>
§found: Vec<ValType>
§

InvalidSelectResultArity

Fields

§found: usize
§

SelectOperandTypeMismatch

Fields

§expected: ValType
§found: Vec<ValType>
§

StackUnderflow

Fields

§op: &'static str
§expected: Vec<ValType>
§available: Vec<ValType>
§

TypeMismatch

Fields

§op: &'static str
§expected: ValType
§found: ValType
§

FunctionResultTypeMismatch

Fields

§expected: Vec<ValType>
§found: Vec<ValType>
§full_stack: Vec<ValType>
§

ResultTypeMismatch

Fields

§expected: Vec<ValType>
§found: Vec<ValType>
§

InvalidStartFunctionType

Fields

§params: Vec<ValType>
§results: Vec<ValType>
§

InvalidElementExpr

§

NonConstantElementExpr

§

ElementExprTypeMismatch

Fields

§expected: ValType
§found: ValType
§

ElementTableTypeMismatch

Fields

§expected: RefType
§found: RefType
§

InvalidCallIndirectTableType

Fields

§expected: RefType
§found: RefType
§

MissingDataCountSection

Fields

§op: &'static str
§

MemorySizeOutOfRange

§

MemoryMinExceedsMax

§

TableTypeMismatch

A non-nullable-element table without an initializer.

§

DuplicateExportName

Fields

§name: String

Trait Implementations§

Source§

impl Clone for ValidationErrorKind

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for ValidationErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ValidationErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ValidationErrorKind

Source§

impl From<DecodeError> for ValidationErrorKind

Source§

fn from(error: DecodeError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ValidationErrorKind

Source§

fn eq(&self, other: &ValidationErrorKind) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ValidationErrorKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.