Enum wiggle::Trap[][src]

pub enum Trap {
    I32Exit(i32),
    String(String),
}

A runtime-independent way for Wiggle to terminate WebAssembly execution. Functions that are marked (@witx noreturn) will always return a Trap. Other functions that want to Trap can do so via their UserErrorConversion trait, which transforms the user’s own error type into a Result<abierror, Trap>.

Variants

I32Exit(i32)

A Trap which indicates an i32 (posix-style) exit code. Runtimes may have a special way of dealing with this for WASI embeddings and otherwise.

String(String)

Any other Trap is just an unstructured String, for reporting and debugging.

Trait Implementations

impl Clone for Trap[src]

impl Debug for Trap[src]

impl Eq for Trap[src]

impl From<GuestError> for Trap[src]

impl PartialEq<Trap> for Trap[src]

impl StructuralEq for Trap[src]

impl StructuralPartialEq for Trap[src]

Auto Trait Implementations

impl RefUnwindSafe for Trap

impl Send for Trap

impl Sync for Trap

impl Unpin for Trap

impl UnwindSafe for Trap

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointee for T[src]

type Pointer = u32

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.