Enum wasmtime_environ::Trap
source · #[non_exhaustive]pub enum Trap {
Show 18 variants
StackOverflow,
MemoryOutOfBounds,
HeapMisaligned,
TableOutOfBounds,
IndirectCallToNull,
BadSignature,
IntegerOverflow,
IntegerDivisionByZero,
BadConversionToInteger,
UnreachableCodeReached,
Interrupt,
AlwaysTrapAdapter,
OutOfFuel,
AtomicWaitNonSharedMemory,
NullReference,
ArrayOutOfBounds,
AllocationTooLarge,
CannotEnterComponent,
}
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.
NullReference
Call to a null reference.
ArrayOutOfBounds
Attempt to access beyond the bounds of an array.
AllocationTooLarge
Attempted an allocation that was too large to succeed.
CannotEnterComponent
When the component-model
feature is enabled this trap represents a
scenario where one component tried to call another component but it
would have violated the reentrance rules of the component model,
triggering a trap instead.
Implementations§
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
impl Copy for Trap
impl Eq for Trap
impl StructuralPartialEq for Trap
Auto Trait Implementations§
impl Freeze for Trap
impl RefUnwindSafe for Trap
impl Send for Trap
impl Sync for Trap
impl Unpin for Trap
impl UnwindSafe for Trap
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> IntoAnyhow for T
impl<T> IntoAnyhow for T
source§fn into_anyhow(self) -> Error
fn into_anyhow(self) -> Error
self
into an anyhow::Error
.