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
Construct a new Wasm trap with the given source location and backtrace.
Internally saves a backtrace when constructed.
Construct a new Wasm trap with the given trap code.
Internally saves a backtrace when constructed.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Trap
impl !UnwindSafe for Trap
Blanket Implementations
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.
Mutably borrows from an owned value. Read more