Trait stacked_errors::StackableErr
source · 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 an 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 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
sourcefn stack_locationless(self) -> Self::Output
fn stack_locationless(self) -> Self::Output
Only converts to Self::Output