pub trait StackError:
Display
+ Debug
+ Send
+ Sync {
// Required methods
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static);
fn as_dyn(&self) -> &dyn StackError;
fn meta(&self) -> Option<&Meta>;
fn source(&self) -> Option<ErrorRef<'_>>;
fn fmt_message(&self, f: &mut Formatter<'_>) -> Result;
fn is_transparent(&self) -> bool;
// Provided methods
fn as_ref(&self) -> ErrorRef<'_> { ... }
fn stack(&self) -> Chain<'_> ⓘ { ... }
fn sources(&self) -> Chain<'_> ⓘ { ... }
fn report(&self) -> Report<'_> { ... }
}Expand description
Trait implemented by errors produced by this crate.
It extends std::error::Error semantics with optional error metadata,
and a source method where sources may also provide metadata.
Required Methods§
Sourcefn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.
Sourcefn as_dyn(&self) -> &dyn StackError
fn as_dyn(&self) -> &dyn StackError
Returns this error as a dyn StackError.
Sourcefn fmt_message(&self, f: &mut Formatter<'_>) -> Result
fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.
Sourcefn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.
Provided Methods§
Trait Implementations§
Source§impl StackError for Box<dyn StackError>
impl StackError for Box<dyn StackError>
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.
Source§fn as_dyn(&self) -> &dyn StackError
fn as_dyn(&self) -> &dyn StackError
Returns this error as a
dyn StackError.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.
Source§fn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.