pub trait Context {
type WithContext;
// Required methods
fn context<D>(self, context: D) -> Self::WithContext
where D: Display;
fn with_context<D, F>(self, cfn: F) -> Self::WithContext
where D: Display,
F: FnOnce() -> D;
}Expand description
The FVM’s equivalent of anyhow::Context. This is intentionally only implemented on
ExecutionError and Result<T, ExecutionError> so anyhow::Context can be imported at the
same time.
Required Associated Types§
type WithContext
Required Methods§
fn context<D>(self, context: D) -> Self::WithContextwhere
D: Display,
fn with_context<D, F>(self, cfn: F) -> Self::WithContext
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.