Crate error
Expand description
Wasmtime’s universal error handling crate.
99% API-compatible with anyhow, but additionally handles out-of-memory
errors, instead of aborting the process.
See the Error documentation for more details.
Macros§
- anyhow
Deprecated - Identical to the
format_err!macro. - bail
- Early exit from the current function with an error.
- ensure
- Ensure that a condition holds true, or else early exit from the current function with an error.
- format_
err - Construct an
Errorvia string formatting or another error.
Structs§
- Chain
- An iterator over each error in an
Error’s context chain. - Error
- Wasmtime’s universal error type.
- OutOf
Memory - Out-of-memory error.
Traits§
- Context
- Extension trait to add error context to results.
- ToWasmtime
Result - Extension trait for easily converting
anyhow::Results intowasmtime::Results.
Functions§
- Ok
- Return
core::result::Result::<T, wasmtime::Error>::Ok(value).
Type Aliases§
- Result
- A result of either
Ok(T)or anErr(Error).