Crate error

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§

anyhowDeprecated
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 Error via string formatting or another error.

Structs§

Chain
An iterator over each error in an Error’s context chain.
Error
Wasmtime’s universal error type.
OutOfMemory
Out-of-memory error.

Traits§

Context
Extension trait to add error context to results.
ToWasmtimeResult
Extension trait for easily converting anyhow::Results into wasmtime::Results.

Functions§

Ok
Return core::result::Result::<T, wasmtime::Error>::Ok(value).

Type Aliases§

Result
A result of either Ok(T) or an Err(Error).