Enum wasmtime_environ::WasmError
source · [−]pub enum WasmError {
InvalidWebAssembly {
message: String,
offset: usize,
},
Unsupported(String),
ImplLimitExceeded,
User(String),
}
Expand description
A WebAssembly translation error.
When a WebAssembly function can’t be translated, one of these error codes will be returned to describe the failure.
Variants
InvalidWebAssembly
Fields
message: String
A string describing the validation error.
offset: usize
The bytecode offset where the error occurred.
The input WebAssembly code is invalid.
This error code is used by a WebAssembly translator when it encounters invalid WebAssembly code. This should never happen for validated WebAssembly code.
Unsupported(String)
A feature used by the WebAssembly code is not supported by the embedding environment.
Embedding environments may have their own limitations and feature restrictions.
ImplLimitExceeded
An implementation limit was exceeded.
Cranelift can compile very large and complicated functions, but the implementation has limits that cause compilation to fail when they are exceeded.
User(String)
Any user-defined error.
Trait Implementations
sourceimpl Error for WasmError
impl Error for WasmError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<BinaryReaderError> for WasmError
impl From<BinaryReaderError> for WasmError
sourcefn from(e: BinaryReaderError) -> WasmError
fn from(e: BinaryReaderError) -> WasmError
Convert from a BinaryReaderError
to a WasmError
.
Auto Trait Implementations
impl RefUnwindSafe for WasmError
impl Send for WasmError
impl Sync for WasmError
impl Unpin for WasmError
impl UnwindSafe for WasmError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more