Enum wasmer_interface_types_fl::errors::InstructionErrorKind[][src]

pub enum InstructionErrorKind {
Show 20 variants InvocationInputIsMissing { index: u32, }, ToNative(WasmValueNativeCastError), LoweringLifting { from: IType, to: IType, }, InvalidValueOnTheStack { expected_type: IType, received_value: IValue, }, StackIsTooSmall { needed: usize, }, LocalOrImportIsMissing { function_index: u32, }, LocalOrImportSignatureMismatch { function_index: u32, expected: (Vec<IType>, Vec<IType>), received: (Vec<IType>, Vec<IType>), }, LocalOrImportCall { function_name: String, }, MemoryIsMissing { memory_index: usize, }, MemoryOutOfBoundsAccess { index: usize, length: usize, }, String(FromUtf8Error), NegativeValue { subject: &'static str, }, TypeIsMissing { type_index: u32, }, RecordTypeByNameIsMissing { record_type_id: u64, }, CorruptedArray(String), CorruptedRecord(String), InvalidTypeKind { expected_kind: TypeKind, received_kind: TypeKind, }, SerdeError(String), LiError(LiError), LoError(LoError),
}
Expand description

The kind of instruction errors.

Variants

InvocationInputIsMissing

The instruction needs to read an invocation input at index index, but it’s missing.

Fields of InvocationInputIsMissing

index: u32

The invocation input index.

Failed to cast from a WIT value to a native value.

Tuple Fields of ToNative

0: WasmValueNativeCastError
LoweringLifting

Failed to cast from from to to.

Fields of LoweringLifting

from: IType

The initial type.

to: IType

The targeted type.

InvalidValueOnTheStack

Read a value from the stack, but it doesn’t have the expected type.

Fields of InvalidValueOnTheStack

expected_type: IType

The expected type.

received_value: IValue

The received type.

StackIsTooSmall

Need to read some values from the stack, but it doesn’t contain enough data.

Fields of StackIsTooSmall

needed: usize

The number of values that were needed.

LocalOrImportIsMissing

The local or import function doesn’t exist.

Fields of LocalOrImportIsMissing

function_index: u32

The local or import function index.

LocalOrImportSignatureMismatch

Values given to a local or import function doesn’t match the function signature.

Fields of LocalOrImportSignatureMismatch

function_index: u32

The local or import function index.

expected: (Vec<IType>, Vec<IType>)

The expected signature.

received: (Vec<IType>, Vec<IType>)

The received signature.

LocalOrImportCall

Failed to call a local or import function.

Fields of LocalOrImportCall

function_name: String

The local or import function name that has been called.

MemoryIsMissing

The memory doesn’t exist.

Fields of MemoryIsMissing

memory_index: usize

The memory index.

MemoryOutOfBoundsAccess

Tried to read out of bounds of the memory.

Fields of MemoryOutOfBoundsAccess

index: usize

The access index.

length: usize

The memory length.

The string contains invalid UTF-8 encoding.

Tuple Fields of String

0: FromUtf8Error
NegativeValue

Out of range integral type conversion attempted.

Fields of NegativeValue

subject: &'static str

The variable name that triggered the error.

TypeIsMissing

The type doesn’t exist.

Fields of TypeIsMissing

type_index: u32

The type index.

RecordTypeByNameIsMissing

The searched by id type doesn’t exist.

Fields of RecordTypeByNameIsMissing

record_type_id: u64

The record type name.

CorruptedArray(String)

Corrupted array’s been popped from the stack.

Tuple Fields of CorruptedArray

0: String
CorruptedRecord(String)

Corrupted record’s been popped from the stack.

Tuple Fields of CorruptedRecord

0: String
InvalidTypeKind

Read a type that has an unexpected type.

Fields of InvalidTypeKind

expected_kind: TypeKind

The expected kind.

received_kind: TypeKind

The received kind.

SerdeError(String)

Errors related to Serialization/deserialization of record.

Tuple Fields of SerdeError

0: String
LiError(LiError)

Errors related to lifting/lowering records.

Tuple Fields of LiError

0: LiError
LoError(LoError)

Errors related to incorrect writing to memory.

Tuple Fields of LoError

0: LoError

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.