pub trait StackableErr {
type Output;
// Required methods
fn stack_err<K: Into<ErrorKind>, F: FnOnce() -> K>(
self,
f: F,
) -> Self::Output;
fn stack_err_locationless<K: Into<ErrorKind>, F: FnOnce() -> K>(
self,
f: F,
) -> Self::Output;
fn stack(self) -> Self::Output;
fn stack_locationless(self) -> Self::Output;
}Expand description
Conversion to and addition to the stack of a stackable_error::Error.
See the main crate documentation and implementation for examples.
Required Associated Types§
Required Methods§
Sourcefn stack_err<K: Into<ErrorKind>, F: FnOnce() -> K>(self, f: F) -> Self::Output
fn stack_err<K: Into<ErrorKind>, F: FnOnce() -> K>(self, f: F) -> Self::Output
Pushes the result of f and location information to the error stack
Sourcefn stack_err_locationless<K: Into<ErrorKind>, F: FnOnce() -> K>(
self,
f: F,
) -> Self::Output
fn stack_err_locationless<K: Into<ErrorKind>, F: FnOnce() -> K>( self, f: F, ) -> Self::Output
Pushes the result of f without location information to the error stack
Sourcefn stack_locationless(self) -> Self::Output
fn stack_locationless(self) -> Self::Output
Only converts to Self::Output and pushes it on the error stack
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.