[]Enum cranelift::prelude::TrapCode

pub enum TrapCode {
    StackOverflow,
    HeapOutOfBounds,
    TableOutOfBounds,
    OutOfBounds,
    IndirectCallToNull,
    BadSignature,
    IntegerOverflow,
    IntegerDivisionByZero,
    BadConversionToInteger,
    UnreachableCodeReached,
    Interrupt,
    User(u16),
}

A trap code describing the reason for a trap.

All trap instructions have an explicit trap code.

Variants

StackOverflow

The current stack space was exhausted.

On some platforms, a stack overflow may also be indicated by a segmentation fault from the stack guard page.

HeapOutOfBounds

A heap_addr instruction detected an out-of-bounds error.

Note that not all out-of-bounds heap accesses are reported this way; some are detected by a segmentation fault on the heap unmapped or offset-guard pages.

TableOutOfBounds

A table_addr instruction detected an out-of-bounds error.

OutOfBounds

Other bounds checking error.

IndirectCallToNull

Indirect call to a null table entry.

BadSignature

Signature mismatch on indirect call.

IntegerOverflow

An integer arithmetic operation caused an overflow.

IntegerDivisionByZero

An integer division by zero.

BadConversionToInteger

Failed float-to-int conversion.

UnreachableCodeReached

Code that was supposed to have been unreachable was reached.

Interrupt

Execution has potentially run too long and may be interrupted. This trap is resumable.

User(u16)

A user-defined trap code.

Trait Implementations

impl Clone for TrapCode

impl Copy for TrapCode

impl Debug for TrapCode

impl Display for TrapCode

impl Eq for TrapCode

impl FromStr for TrapCode

type Err = ()

The associated error which can be returned from parsing.

impl Hash for TrapCode

impl PartialEq<TrapCode> for TrapCode

impl StructuralEq for TrapCode

impl StructuralPartialEq for TrapCode

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.