pub struct ErrorInfo { /* private fields */ }Expand description
Type-erased container holding error information.
This allows storing and passing error metadata without exposing the concrete type.
Implementations§
Source§impl ErrorInfo
impl ErrorInfo
Sourcepub fn tp(&self) -> ResultType
pub fn tp(&self) -> ResultType
Returns the classification of the result (e.g. success, client error, service error).
Sourcepub fn service(&self) -> Option<&'static str>
pub fn service(&self) -> Option<&'static str>
Returns the name of the responsible service, if applicable.
Sourcepub fn signature(&self) -> &'static str
pub fn signature(&self) -> &'static str
Returns a stable identifier for the specific error classification.
Trait Implementations§
Source§impl Error for ErrorInfo
impl Error for ErrorInfo
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 ErrorDiagnostic for ErrorInfo
impl ErrorDiagnostic for ErrorInfo
type Kind = ErrorInfoType
Source§fn service(&self) -> Option<&'static str>
fn service(&self) -> Option<&'static str>
Returns the name of the responsible service, if applicable. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a backtrace for debugging purposes, if available.
fn chain(self) -> ErrorChain<Self::Kind>where
Self: Sized,
Auto Trait Implementations§
impl Freeze for ErrorInfo
impl !RefUnwindSafe for ErrorInfo
impl !Send for ErrorInfo
impl !Sync for ErrorInfo
impl Unpin for ErrorInfo
impl UnsafeUnpin for ErrorInfo
impl !UnwindSafe for ErrorInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more