Enum wasmtime_runtime::TrapReason
source · Expand description
Enumeration of different methods of raising a trap.
Variants
User
Fields
error: Error
The actual user trap error.
needs_backtrace: bool
Whether we need to capture a backtrace for this error or not.
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(TrapCode)
A trap raised from a wasm libcall
Implementations
sourceimpl 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
sourceimpl Debug for TrapReason
impl Debug for TrapReason
sourceimpl 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more