Enum wasmtime_runtime::TrapReason
source · pub enum TrapReason {
User {
error: Error,
needs_backtrace: bool,
},
Jit(usize),
Wasm(Trap),
}
Expand description
Enumeration of different methods of raising a trap.
Variants§
User
Fields
A user-raised trap through raise_user_trap
.
Jit(usize)
A trap raised from Cranelift-generated code with the pc listed of where the trap came from.
Wasm(Trap)
A trap raised from a wasm libcall
Implementations§
source§impl TrapReason
impl TrapReason
sourcepub fn user_without_backtrace(error: Error) -> Self
pub fn user_without_backtrace(error: Error) -> Self
Create a new TrapReason::User
that does not have a backtrace yet.
sourcepub fn user_with_backtrace(error: Error) -> Self
pub fn user_with_backtrace(error: Error) -> Self
Create a new TrapReason::User
that already has a backtrace.
Trait Implementations§
source§impl Debug for TrapReason
impl Debug for TrapReason
source§impl From<Error> for TrapReason
impl From<Error> for TrapReason
Auto Trait Implementations§
impl !RefUnwindSafe for TrapReason
impl Send for TrapReason
impl Sync for TrapReason
impl Unpin 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