Enum holochain_wasmer_guest::WasmError[][src]

pub enum WasmError {
    PointerMap,
    Deserialize(Vec<u8, Global>),
    Serialize(SerializedBytesError),
    ErrorWhileError,
    Memory,
    GuestResultHandling(String),
    Guest(String),
    Host(String),
    Compile(String),
    CallError(String),
}

Enum of all possible ERROR codes that a Zome API Function could return.

Variants

PointerMap

while converting pointers and lengths between u64 and i64 across the host/guest we hit either a negative number (cannot fit in u64) or very large number (cannot fit in i64) negative pointers and lengths are almost certainly indicative of a critical bug somewhere max i64 represents about 9.2 exabytes so should keep us going long enough to patch wasmer if commercial hardware ever threatens to overstep this limit

Deserialize(Vec<u8, Global>)

These bytes failed to deserialize. The host should provide nice debug info and context that the wasm guest won't have.

Something failed to serialize. This should be rare or impossible for basically everything that implements Serialize.

ErrorWhileError

Somehow we errored while erroring. For example, maybe we failed to serialize an error while attempting to serialize an error.

Memory

Something went wrong while writing or reading bytes to/from wasm memory. this means something like "reading 16 bytes did not produce 2x WasmSize ints" or maybe even "failed to write a byte to some pre-allocated wasm memory" whatever this is it is very bad and probably not recoverable

GuestResultHandling(String)

Failed to take bytes out of the guest and do something with it. The string is whatever error message comes back from the interal process.

Guest(String)

Something to do with guest logic that we don't know about

Host(String)

Something to do with host logic that we don't know about

Compile(String)

Somehow wasmer failed to compile machine code from wasm byte code

CallError(String)

Trait Implementations

impl Clone for WasmError[src]

impl Debug for WasmError[src]

impl<'de> Deserialize<'de> for WasmError[src]

impl Display for WasmError[src]

impl Eq for WasmError[src]

impl Error for WasmError[src]

impl From<Infallible> for WasmError[src]

Allows ? in a TryFrom context downstream.

impl From<SerializedBytesError> for WasmError[src]

impl From<TryFromIntError> for WasmError[src]

impl From<TryFromSliceError> for WasmError[src]

impl Hash for WasmError[src]

impl Ord for WasmError[src]

impl PartialEq<WasmError> for WasmError[src]

impl PartialOrd<WasmError> for WasmError[src]

impl Serialize for WasmError[src]

impl StructuralEq for WasmError[src]

impl StructuralPartialEq for WasmError[src]

impl<'_> TryFrom<&'_ WasmError> for SerializedBytes[src]

type Error = SerializedBytesError

The type returned in the event of a conversion error.

impl TryFrom<SerializedBytes> for WasmError[src]

type Error = SerializedBytesError

The type returned in the event of a conversion error.

impl TryFrom<WasmError> for SerializedBytes[src]

type Error = SerializedBytesError

The type returned in the event of a conversion error.

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.