pub trait SiftError<T, C>{
// Required methods
fn context(self, ctx: C) -> Result<T>;
fn with_context<F>(self, op: F) -> Result<T>
where F: Fn() -> C;
fn help(self, txt: C) -> Result<T>;
}
Expand description
Trait that defines the behavior of errors that Sift manages.
Required Methods§
Sourcefn with_context<F>(self, op: F) -> Result<T>where
F: Fn() -> C,
fn with_context<F>(self, op: F) -> Result<T>where
F: Fn() -> C,
Like context
but takes in a closure.
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.