Enum hdk::prelude::WasmErrorInner
[−]pub enum WasmErrorInner {
PointerMap,
Deserialize(Vec<u8, Global>),
Serialize(SerializedBytesError),
ErrorWhileError,
Memory,
GuestResultHandling(String),
Guest(String),
Host(String),
HostShortCircuit(Vec<u8, Global>),
Compile(String),
CallError(String),
UninitializedSerializedModuleCache,
}
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.
Serialize(SerializedBytesError)
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
HostShortCircuit(Vec<u8, Global>)
Something to do with host logic that we don’t know about
AND wasm execution MUST immediately halt.
The Vec
Compile(String)
Somehow wasmer failed to compile machine code from wasm byte code
CallError(String)
UninitializedSerializedModuleCache
Trait Implementations
impl Clone for WasmErrorInner
impl Clone for WasmErrorInner
fn clone(&self) -> WasmErrorInner
fn clone(&self) -> WasmErrorInner
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreimpl Debug for WasmErrorInner
impl Debug for WasmErrorInner
impl<'de> Deserialize<'de> for WasmErrorInner
impl<'de> Deserialize<'de> for WasmErrorInner
fn deserialize<__D>(
__deserializer: __D
) -> Result<WasmErrorInner, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<WasmErrorInner, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl From<SerializedBytesError> for WasmErrorInner
impl From<SerializedBytesError> for WasmErrorInner
fn from(error: SerializedBytesError) -> WasmErrorInner
fn from(error: SerializedBytesError) -> WasmErrorInner
impl From<TryFromIntError> for WasmErrorInner
impl From<TryFromIntError> for WasmErrorInner
fn from(TryFromIntError) -> WasmErrorInner
fn from(TryFromIntError) -> WasmErrorInner
impl From<TryFromSliceError> for WasmErrorInner
impl From<TryFromSliceError> for WasmErrorInner
fn from(TryFromSliceError) -> WasmErrorInner
fn from(TryFromSliceError) -> WasmErrorInner
impl Hash for WasmErrorInner
impl Hash for WasmErrorInner
impl Ord for WasmErrorInner
impl Ord for WasmErrorInner
fn cmp(&self, other: &WasmErrorInner) -> Ordering
fn cmp(&self, other: &WasmErrorInner) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
impl PartialEq<WasmErrorInner> for WasmErrorInner
impl PartialEq<WasmErrorInner> for WasmErrorInner
fn eq(&self, other: &WasmErrorInner) -> bool
fn eq(&self, other: &WasmErrorInner) -> bool
impl PartialOrd<WasmErrorInner> for WasmErrorInner
impl PartialOrd<WasmErrorInner> for WasmErrorInner
fn partial_cmp(&self, other: &WasmErrorInner) -> Option<Ordering>
fn partial_cmp(&self, other: &WasmErrorInner) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Serialize for WasmErrorInner
impl Serialize for WasmErrorInner
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for WasmErrorInner
impl StructuralEq for WasmErrorInner
impl StructuralPartialEq for WasmErrorInner
Auto Trait Implementations
impl RefUnwindSafe for WasmErrorInner
impl Send for WasmErrorInner
impl Sync for WasmErrorInner
impl Unpin for WasmErrorInner
impl UnwindSafe for WasmErrorInner
Blanket Implementations
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
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
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;