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

pub enum InstructionErrorKind {
    InvocationInputIsMissing {
        index: u32,
    },
    ToNative(WasmValueNativeCastError),
    LoweringLifting {
        from: InterfaceType,
        to: InterfaceType,
    },
    InvalidValueOnTheStack {
        expected_type: InterfaceType,
        received_type: InterfaceType,
    },
    StackIsTooSmall {
        needed: usize,
    },
    LocalOrImportIsMissing {
        function_index: u32,
    },
    LocalOrImportSignatureMismatch {
        function_index: u32,
        expected: (Vec<InterfaceType>, Vec<InterfaceType>),
        received: (Vec<InterfaceType>, Vec<InterfaceType>),
    },
    LocalOrImportCall {
        function_index: u32,
    },
    MemoryIsMissing {
        memory_index: u32,
    },
    MemoryOutOfBoundsAccess {
        index: usize,
        length: usize,
    },
    String(FromUtf8Error),
    NegativeValue {
        subject: &'static str,
    },
    TypeIsMissing {
        type_index: u32,
    },
    InvalidTypeKind {
        expected_kind: TypeKind,
        received_kind: TypeKind,
    },
    SerdeError(String),
}

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.

LoweringLifting

Failed to cast from from to to.

Fields of LoweringLifting

from: InterfaceType

The initial type.

to: InterfaceType

The targeted type.

InvalidValueOnTheStack

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

Fields of InvalidValueOnTheStack

expected_type: InterfaceType

The expected type.

received_type: InterfaceType

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<InterfaceType>, Vec<InterfaceType>)

The expected signature.

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

The received signature.

LocalOrImportCall

Failed to call a local or import function.

Fields of LocalOrImportCall

function_index: u32

The local or import function index that has been called.

MemoryIsMissing

The memory doesn't exist.

Fields of MemoryIsMissing

memory_index: u32

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.

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.

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.

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]

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.