pub enum TrapReason {
Show 15 variants
Unreachable,
Host,
DivideByZero,
InvalidTableIndex,
InvalidTableFunctionType,
UninitializedTableElement,
GlobalGetFailed,
GlobalSetFailed,
OutOfMemory,
MemoryRefNotUnique,
MemoryOutOfBounds,
StackOverflow,
UnrepresentableResult,
IntegerOverflow,
BadConversionToInteger,
}Variants§
Unreachable
Triggered by unreachable instruction
Host
A host function has noted an unrecoverable failure
DivideByZero
Integer or floating point division by zero
InvalidTableIndex
An indirect call tried to map to a table function out of range
InvalidTableFunctionType
The function type in an indirect call does not match the function pointer’s type
UninitializedTableElement
An indirect call tried to map to a table function out of range
GlobalGetFailed
An imported global could not be read
GlobalSetFailed
An imported global could not be set
OutOfMemory
A memory operation is out of bounds
MemoryRefNotUnique
memory.grow failed because a host function has taken ownership of a memory
MemoryOutOfBounds
A memory operation is out of bounds
StackOverflow
Ran out of stack space
UnrepresentableResult
Attempting to convert Inf to integer
IntegerOverflow
Signed division causes integer overflow
BadConversionToInteger
Attempting to convert NaN to integer
Trait Implementations§
Source§impl Clone for TrapReason
impl Clone for TrapReason
Source§fn clone(&self) -> TrapReason
fn clone(&self) -> TrapReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TrapReason
Source§impl Debug for TrapReason
impl Debug for TrapReason
impl Eq for TrapReason
Source§impl From<TrapReason> for InterpreterBreak
impl From<TrapReason> for InterpreterBreak
Source§fn from(err: TrapReason) -> Self
fn from(err: TrapReason) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TrapReason
impl PartialEq for TrapReason
impl StructuralPartialEq for TrapReason
Auto Trait Implementations§
impl Freeze for TrapReason
impl RefUnwindSafe for TrapReason
impl Send for TrapReason
impl Sync for TrapReason
impl Unpin for TrapReason
impl UnsafeUnpin for TrapReason
impl UnwindSafe for TrapReason
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
Mutably borrows from an owned value. Read more