pub enum WasmError {
Compile(String),
Instantiation(String),
Call(String),
MemoryAccess,
FuelExhausted,
Trap(String),
}Expand description
Errors that can occur during WASM module compilation, instantiation, or execution.
Variants§
Compile(String)
The WASM bytes failed to compile (parse, validate, or codegen error).
Instantiation(String)
The module could not be instantiated (e.g., missing import, link error).
Call(String)
A host function call failed at runtime.
MemoryAccess
Reading from or writing to WASM linear memory failed (bounds check).
FuelExhausted
The WASM module consumed all available fuel and was stopped.
Trap(String)
The WASM module trapped (unreachable, integer divide-by-zero, etc.).
Trait Implementations§
Source§impl Error for WasmError
impl Error for WasmError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl Eq for WasmError
impl StructuralPartialEq for WasmError
Auto Trait Implementations§
impl Freeze for WasmError
impl RefUnwindSafe for WasmError
impl Send for WasmError
impl Sync for WasmError
impl Unpin for WasmError
impl UnsafeUnpin for WasmError
impl UnwindSafe for WasmError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.