Enum wasmtime_environ::Trap
source · #[non_exhaustive]
pub enum Trap {
Show 14 variants
StackOverflow,
MemoryOutOfBounds,
HeapMisaligned,
TableOutOfBounds,
IndirectCallToNull,
BadSignature,
IntegerOverflow,
IntegerDivisionByZero,
BadConversionToInteger,
UnreachableCodeReached,
Interrupt,
AlwaysTrapAdapter,
OutOfFuel,
AtomicWaitNonSharedMemory,
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
StackOverflow
The current stack space was exhausted.
MemoryOutOfBounds
An out-of-bounds memory access.
HeapMisaligned
A wasm atomic operation was presented with a not-naturally-aligned linear-memory address.
TableOutOfBounds
An out-of-bounds access to a table.
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.
AlwaysTrapAdapter
When the component-model
feature is enabled this trap represents a
function that was canon lift
’d, then canon lower
’d, then called.
This combination of creation of a function in the component model
generates a function that always traps and, when called, produces this
flavor of trap.
OutOfFuel
When wasm code is configured to consume fuel and it runs out of fuel then this trap will be raised.
Used to indicate that a trap was raised by atomic wait operations on non shared memory.
Trait Implementations§
source§impl Error for Trap
impl Error for Trap
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl PartialEq<Trap> for Trap
impl PartialEq<Trap> for Trap
impl Copy for Trap
impl Eq for Trap
impl StructuralEq for Trap
impl StructuralPartialEq for Trap
Auto Trait Implementations§
impl RefUnwindSafe for Trap
impl Send for Trap
impl Sync for Trap
impl Unpin for Trap
impl UnwindSafe for Trap
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.