pub trait ErrorContext<T> {
// Required methods
fn error<M: Into<Cow<'static, str>>>(self, message: M) -> Result<T>;
fn or_error<M: Into<Cow<'static, str>>, F: FnOnce() -> M>(
self,
f: F,
) -> Result<T>;
}
Required Methods§
fn error<M: Into<Cow<'static, str>>>(self, message: M) -> Result<T>
fn or_error<M: Into<Cow<'static, str>>, F: FnOnce() -> M>( self, f: F, ) -> Result<T>
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.