Enum wiggle::wasmtime_crate::TrapCode [−][src]
#[non_exhaustive]
pub enum TrapCode {
StackOverflow,
MemoryOutOfBounds,
HeapMisaligned,
TableOutOfBounds,
IndirectCallToNull,
BadSignature,
IntegerOverflow,
IntegerDivisionByZero,
BadConversionToInteger,
UnreachableCodeReached,
Interrupt,
}
Expand description
A trap code describing the reason for a trap.
All trap instructions have an explicit trap code.
The code can be accessed from the c-api, where the possible values are translated into enum values defined there:
wasm_trap_code
in c-api/src/trap.rs, andwasmtime_trap_code_enum
in c-api/include/wasmtime/trap.h.
These need to be kept in sync.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
The current stack space was exhausted.
An out-of-bounds memory access.
A wasm atomic operation was presented with a not-naturally-aligned linear-memory address.
An out-of-bounds access to a table.
Indirect call to a null table entry.
Signature mismatch on indirect call.
An integer arithmetic operation caused an overflow.
An integer division by zero.
Failed float-to-int conversion.
Code that was supposed to have been unreachable was reached.
Execution has potentially run too long and may be interrupted.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TrapCode
impl UnwindSafe for TrapCode
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more