[][src]Enum cranelift_codegen::ir::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[src]

impl Copy for TrapCode[src]

impl Debug for TrapCode[src]

impl Display for TrapCode[src]

impl Eq for TrapCode[src]

impl FromStr for TrapCode[src]

type Err = ()

The associated error which can be returned from parsing.

impl Hash for TrapCode[src]

impl PartialEq<TrapCode> for TrapCode[src]

impl StructuralEq for TrapCode[src]

impl StructuralPartialEq for TrapCode[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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?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.