wasmtime_internal_core/error/
mod.rs1#[cfg(feature = "backtrace")]
9mod backtrace;
10mod boxed;
11mod context;
12mod error;
13mod oom;
14mod ptr;
15#[cfg(feature = "anyhow")]
16mod to_wasmtime_result;
17mod vtable;
18
19#[doc(hidden)]
20pub mod macros;
21
22pub use crate::{bail, ensure, format_err};
23#[cfg(feature = "backtrace")]
24pub use backtrace::disable_backtrace;
25pub use context::Context;
26pub use error::*;
27pub use oom::OutOfMemory;
28#[cfg(feature = "anyhow")]
29pub use to_wasmtime_result::ToWasmtimeResult;
30
31pub type Result<T, E = Error> = core::result::Result<T, E>;
33
34#[allow(non_snake_case, reason = "matching anyhow API")]
39pub fn Ok<T>(value: T) -> Result<T> {
40 core::result::Result::Ok(value)
41}