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

pub enum InstructionErrorKind {
Show 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),
}

The kind of instruction errors.

Variants

InvocationInputIsMissing

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

Show fields

Fields of InvocationInputIsMissing

index: u32

The invocation input index.

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

LoweringLifting

Failed to cast from from to to.

Show fields

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.

Show fields

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.

Show fields

Fields of StackIsTooSmall

needed: usize

The number of values that were needed.

LocalOrImportIsMissing

The local or import function doesn’t exist.

Show fields

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.

Show fields

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.

Show fields

Fields of LocalOrImportCall

function_name: String

The local or import function name that has been called.

MemoryIsMissing

The memory doesn’t exist.

Show fields

Fields of MemoryIsMissing

memory_index: usize

The memory index.

MemoryOutOfBoundsAccess

Tried to read out of bounds of the memory.

Show fields

Fields of MemoryOutOfBoundsAccess

index: usize

The access index.

length: usize

The memory length.

The string contains invalid UTF-8 encoding.

NegativeValue

Out of range integral type conversion attempted.

Show fields

Fields of NegativeValue

subject: &'static str

The variable name that triggered the error.

TypeIsMissing

The type doesn’t exist.

Show fields

Fields of TypeIsMissing

type_index: u32

The type index.

RecordTypeByNameIsMissing

The searched by id type doesn’t exist.

Show fields

Fields of RecordTypeByNameIsMissing

record_type_id: u64

The record type name.

CorruptedArray(String)

Corrupted array’s been popped from the stack.

CorruptedRecord(String)

Corrupted record’s been popped from the stack.

InvalidTypeKind

Read a type that has an unexpected type.

Show fields

Fields of InvalidTypeKind

expected_kind: TypeKind

The expected kind.

received_kind: TypeKind

The received kind.

SerdeError(String)

Errors related to Serialization/deserialization of record.

LiError(LiError)

Errors related to lifting/lowering records.

LoError(LoError)

Errors related to incorrect writing to memory.

Trait Implementations

impl Debug for InstructionErrorKind[src]

impl Display for InstructionErrorKind[src]

impl Error for InstructionErrorKind[src]

impl From<(TryFromIntError, &'static str)> for InstructionErrorKind[src]

impl From<LiError> for InstructionErrorKind[src]

impl From<LoError> for InstructionErrorKind[src]

impl From<WasmValueNativeCastError> for InstructionErrorKind[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.