pub enum Trap {
Unreachable,
MemoryOutOfBounds {
offset: usize,
len: usize,
max: usize,
},
TableOutOfBounds {
offset: usize,
len: usize,
max: usize,
},
DivisionByZero,
InvalidConversionToInt,
IntegerOverflow,
CallStackOverflow,
UndefinedElement {
index: usize,
},
UninitializedElement {
index: usize,
},
IndirectCallTypeMismatch {
expected: FuncType,
actual: FuncType,
},
}Expand description
A WebAssembly trap
See https://webassembly.github.io/spec/core/intro/overview.html#trap
Variants§
Unreachable
An unreachable instruction was executed
MemoryOutOfBounds
An out-of-bounds memory access occurred
Fields
TableOutOfBounds
An out-of-bounds table access occurred
Fields
DivisionByZero
A division by zero occurred
InvalidConversionToInt
Invalid Integer Conversion
IntegerOverflow
Integer Overflow
CallStackOverflow
Call stack overflow
UndefinedElement
An undefined element was encountered
UninitializedElement
An uninitialized element was encountered
IndirectCallTypeMismatch
Indirect call type mismatch
Implementations§
Trait Implementations§
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> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.