Struct wasmi::Trap [−][src]
pub struct Trap { /* fields omitted */ }
Error type which can thrown by wasm code or by host environment.
Under some conditions, wasm execution may produce a Trap
, which immediately aborts execution.
Traps can't be handled by WebAssembly code, but are reported to the embedder.
Methods
impl Trap
[src]
impl Trap
pub fn new(kind: TrapKind) -> Trap
[src]
pub fn new(kind: TrapKind) -> Trap
Create new trap.
pub fn kind(&self) -> &TrapKind
[src]
pub fn kind(&self) -> &TrapKind
Returns kind of this trap.
Trait Implementations
impl Debug for Trap
[src]
impl Debug for Trap
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Display for Trap
[src]
impl Display for Trap
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Error for Trap
[src]
impl Error for Trap
fn description(&self) -> &str
[src]
fn description(&self) -> &str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
1.0.0[src]
fn cause(&self) -> Option<&Error>
1.0.0
[src]The lower-level cause of this error, if any. Read more
impl<U> From<U> for Trap where
U: HostError + Sized,
[src]
impl<U> From<U> for Trap where
U: HostError + Sized,
impl From<Trap> for Error
[src]
impl From<Trap> for Error
impl From<TrapKind> for Trap
[src]
impl From<TrapKind> for Trap