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 Trappub fn new(kind: TrapKind) -> Trap[src]
pub fn new(kind: TrapKind) -> TrapCreate new trap.
pub fn kind(&self) -> &TrapKind[src]
pub fn kind(&self) -> &TrapKindReturns kind of this trap.
Trait Implementations
impl Debug for Trap[src]
impl Debug for Trapfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Display for Trap[src]
impl Display for Trapfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Error for Trap[src]
impl Error for Trapfn description(&self) -> &str[src]
fn description(&self) -> &strThis 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 Errorimpl From<TrapKind> for Trap[src]
impl From<TrapKind> for Trap