Enum wasmer_vm::Trap [−][src]
pub enum Trap { User(Box<dyn Error + Send + Sync>), Wasm { pc: usize, backtrace: Backtrace, signal_trap: Option<TrapCode>, }, Lib { trap_code: TrapCode, backtrace: Backtrace, }, OOM { backtrace: Backtrace, }, }
Expand description
Stores trace message with backtrace.
Variants
A user-raised trap through raise_user_trap
.
A trap raised from the Wasm generated code
Note: this trap is deterministic (assuming a deterministic host implementation)
Show fields
A trap raised from a wasm libcall
Note: this trap is deterministic (assuming a deterministic host implementation)
Show fields
A trap indicating that the runtime was unable to allocate sufficient memory.
Note: this trap is nondeterministic, since it depends on the host system.
Show fields
Fields of OOM
backtrace: Backtrace
Native stack backtrace at the time the OOM occurred
Implementations
impl Trap
[src]
impl Trap
[src]pub fn wasm(
pc: usize,
backtrace: Backtrace,
signal_trap: Option<TrapCode>
) -> Self
[src]
pub fn wasm(
pc: usize,
backtrace: Backtrace,
signal_trap: Option<TrapCode>
) -> Self
[src]Construct a new Wasm trap with the given source location and backtrace.
Internally saves a backtrace when constructed.
Trait Implementations
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
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more