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
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.
Fields
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§
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)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<BinaryReaderError> for WasmError
impl From<BinaryReaderError> for WasmError
source§fn from(e: BinaryReaderError) -> Self
fn from(e: BinaryReaderError) -> Self
Convert from a BinaryReaderError
to a WasmError
.
source§impl From<TryFromIntError> for WasmError
impl From<TryFromIntError> for WasmError
source§fn from(e: TryFromIntError) -> Self
fn from(e: TryFromIntError) -> Self
Convert from a TryFromIntError
to a WasmError
.
source§impl From<WasmError> for CompileError
impl From<WasmError> for CompileError
source§fn from(err: WasmError) -> CompileError
fn from(err: WasmError) -> CompileError
Auto Trait Implementations§
impl Freeze for WasmError
impl RefUnwindSafe for WasmError
impl Send for WasmError
impl Sync for WasmError
impl Unpin 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
source§impl<T> IntoAnyhow for T
impl<T> IntoAnyhow for T
source§fn into_anyhow(self) -> Error
fn into_anyhow(self) -> Error
self
into an anyhow::Error
.