Enum wasmer_types::TrapCode
source · #[repr(u32)]pub enum TrapCode {
StackOverflow = 0,
HeapAccessOutOfBounds = 1,
HeapMisaligned = 2,
TableAccessOutOfBounds = 3,
IndirectCallToNull = 4,
BadSignature = 5,
IntegerOverflow = 6,
IntegerDivisionByZero = 7,
BadConversionToInteger = 8,
UnreachableCodeReached = 9,
UnalignedAtomic = 10,
UncaughtException = 11,
}
Expand description
A trap code describing the reason for a trap.
All trap instructions have an explicit trap code.
Variants§
StackOverflow = 0
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.
HeapAccessOutOfBounds = 1
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.
HeapMisaligned = 2
A heap_addr
instruction was misaligned.
TableAccessOutOfBounds = 3
A table_addr
instruction detected an out-of-bounds error.
IndirectCallToNull = 4
Indirect call to a null table entry.
BadSignature = 5
Signature mismatch on indirect call.
IntegerOverflow = 6
An integer arithmetic operation caused an overflow.
IntegerDivisionByZero = 7
An integer division by zero.
BadConversionToInteger = 8
Failed float-to-int conversion.
UnreachableCodeReached = 9
Code that was supposed to have been unreachable was reached.
UnalignedAtomic = 10
An atomic memory access was attempted with an unaligned pointer.
UncaughtException = 11
An exception was thrown but it was left uncaught.
Implementations§
Trait Implementations§
source§impl Archive for TrapCode
impl Archive for TrapCode
§type Archived = ArchivedTrapCode
type Archived = ArchivedTrapCode
§type Resolver = TrapCodeResolver
type Resolver = TrapCodeResolver
source§fn resolve(&self, resolver: Self::Resolver, out: Place<Self::Archived>)
fn resolve(&self, resolver: Self::Resolver, out: Place<Self::Archived>)
§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
serialize
. Read moresource§impl<'de> Deserialize<'de> for TrapCode
impl<'de> Deserialize<'de> for TrapCode
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Error for TrapCode
impl Error for TrapCode
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<ArchivedTrapCode> for TrapCode
impl PartialEq<ArchivedTrapCode> for TrapCode
source§fn eq(&self, other: &ArchivedTrapCode) -> bool
fn eq(&self, other: &ArchivedTrapCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<TrapCode> for ArchivedTrapCode
impl PartialEq<TrapCode> for ArchivedTrapCode
source§impl PartialEq for TrapCode
impl PartialEq for TrapCode
impl Copy for TrapCode
impl Eq for TrapCode
impl StructuralPartialEq for TrapCode
Auto Trait Implementations§
impl Freeze for TrapCode
impl RefUnwindSafe for TrapCode
impl Send for TrapCode
impl Sync for TrapCode
impl Unpin for TrapCode
impl UnwindSafe for TrapCode
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive
, it may be
unsized. Read more§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.