pub type Error = StackedError;Aliased Type§
pub struct Error { /* private fields */ }Implementations§
Source§impl Error
Note: in most cases you can use Error::from or a call from StackableErr
instead of these functions.
impl Error
Note: in most cases you can use Error::from or a call from StackableErr
instead of these functions.
pub fn from_err<E: Display + Send + Sync + 'static>(e: E) -> Self
pub fn from_err_locationless<E: Display + Send + Sync + 'static>(e: E) -> Self
Sourcepub fn push_err<E: Display + Send + Sync + 'static>(&mut self, e: E)
pub fn push_err<E: Display + Send + Sync + 'static>(&mut self, e: E)
Pushes error e with location to the stack
Sourcepub fn add_err<E: Display + Send + Sync + 'static>(self, e: E) -> Self
pub fn add_err<E: Display + Send + Sync + 'static>(self, e: E) -> Self
Adds error e with location to the stack
Sourcepub fn push_err_locationless<E: Display + Send + Sync + 'static>(
&mut self,
e: E,
)
pub fn push_err_locationless<E: Display + Send + Sync + 'static>( &mut self, e: E, )
Pushes error e without location information to the stack
Sourcepub fn add_err_locationless<E: Display + Send + Sync + 'static>(
self,
e: E,
) -> Self
pub fn add_err_locationless<E: Display + Send + Sync + 'static>( self, e: E, ) -> Self
Adds error e without location information to the stack
Sourcepub fn chain_errors(self, other: Self) -> Self
pub fn chain_errors(self, other: Self) -> Self
Moves the stack of other onto self
Sourcepub fn probably_not_root_cause() -> Self
pub fn probably_not_root_cause() -> Self
Returns a base ProbablyNotRootCauseError error
Sourcepub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
Returns if a TimeoutError is in the error stack
Sourcepub fn is_probably_not_root_cause(&self) -> bool
pub fn is_probably_not_root_cause(&self) -> bool
Returns if a ProbablyNotRootCauseError is in the error stack
Sourcepub fn iter(&self) -> Iter<'_, ErrorItem>
pub fn iter(&self) -> Iter<'_, ErrorItem>
Iteration over the StackedErrorDowncast items of self
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, ErrorItem>
pub fn iter_mut(&mut self) -> IterMut<'_, ErrorItem>
Mutable iteration over the StackedErrorDowncast items of self
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<'a> IntoIterator for &'a Error
impl<'a> IntoIterator for &'a Error
Source§impl<'a> IntoIterator for &'a mut Error
impl<'a> IntoIterator for &'a mut Error
Source§impl StackableErr for Error
impl StackableErr for Error
type Output = Result<(), StackedError>
Source§fn stack_locationless(self) -> Self::Output
fn stack_locationless(self) -> Self::Output
Only converts to
Self::Output and pushes it on the error stackSource§fn stack_err<E1: Display + Send + Sync + 'static>(self, e: E1) -> Self::Output
fn stack_err<E1: Display + Send + Sync + 'static>(self, e: E1) -> Self::Output
Pushes the result of
f and location information to the error stackSource§fn stack_err_with<E1: Display + Send + Sync + 'static, F: FnOnce() -> E1>(
self,
f: F,
) -> Self::Output
fn stack_err_with<E1: Display + Send + Sync + 'static, F: FnOnce() -> E1>( self, f: F, ) -> Self::Output
Pushes
e and location information to the error stackSource§fn stack_err_locationless<E1: Display + Send + Sync + 'static>(
self,
e: E1,
) -> Self::Output
fn stack_err_locationless<E1: Display + Send + Sync + 'static>( self, e: E1, ) -> Self::Output
Pushes
e without location information to the error stackSource§fn stack_err_with_locationless<E1: Display + Send + Sync + 'static, F: FnOnce() -> E1>(
self,
f: F,
) -> Self::Output
fn stack_err_with_locationless<E1: Display + Send + Sync + 'static, F: FnOnce() -> E1>( self, f: F, ) -> Self::Output
Pushes the result of
f without location information to the error stackSource§fn wrap_err<D: Display + Send + Sync + 'static>(self, msg: D) -> Self::Output
fn wrap_err<D: Display + Send + Sync + 'static>(self, msg: D) -> Self::Output
Alternate for StackableErr::stack_err which can be used for easier
translation to and from the
eyre crateSource§fn wrap_err_with<D: Display + Send + Sync + 'static, F: FnOnce() -> D>(
self,
msg: F,
) -> Self::Output
fn wrap_err_with<D: Display + Send + Sync + 'static, F: FnOnce() -> D>( self, msg: F, ) -> Self::Output
Alternate for StackableErr::stack_err_with which can be used for
easier translation to and from the
eyre crateSource§fn context<D: Display + Send + Sync + 'static>(self, msg: D) -> Self::Output
fn context<D: Display + Send + Sync + 'static>(self, msg: D) -> Self::Output
Alternate for StackableErr::stack_err which can be used for easier
translation to and from the
anyhow crateSource§fn with_context<D: Display + Send + Sync + 'static, F: FnOnce() -> D>(
self,
msg: F,
) -> Self::Output
fn with_context<D: Display + Send + Sync + 'static, F: FnOnce() -> D>( self, msg: F, ) -> Self::Output
Alternate for StackableErr::stack_err_with which can be used for
easier translation to and from the
anyhow crate