Struct autopush_common::errors::ApcError
source · pub struct ApcError {
pub kind: ApcErrorKind,
pub backtrace: Box<Backtrace>,
}
Expand description
AutoPush Common error (To distinguish from endpoint’s ApiError)
Fields§
§kind: ApcErrorKind
§backtrace: Box<Backtrace>
Trait Implementations§
source§impl Error for ApcError
impl Error for ApcError
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 ReportableError for ApcError
impl ReportableError for ApcError
source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Return a
Backtrace
for this Error if one was capturedsource§fn is_sentry_event(&self) -> bool
fn is_sentry_event(&self) -> bool
Whether this error is reported to Sentry
source§fn metric_label(&self) -> Option<&'static str>
fn metric_label(&self) -> Option<&'static str>
Errors that don’t emit Sentry events (!is_sentry_event()) emit an
increment metric instead with this label
source§fn reportable_source(&self) -> Option<&(dyn ReportableError + 'static)>
fn reportable_source(&self) -> Option<&(dyn ReportableError + 'static)>
Like [Error::source] but returns the source (if any) of this error as a
ReportableError if it implements the trait. Otherwise callers of this
method will likely subsequently call [Error::source] to return the
source (if any) as the parent [Error] trait.
Experimental: return tag key value pairs for metrics and Sentry
source§impl ResponseError for ApcError
impl ResponseError for ApcError
Return a structured response error for the ApcError
source§fn status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Returns appropriate status code for error. Read more
source§fn error_response(&self) -> HttpResponse
fn error_response(&self) -> HttpResponse
Creates full response for error. Read more
Auto Trait Implementations§
impl Freeze for ApcError
impl !RefUnwindSafe for ApcError
impl Send for ApcError
impl Sync for ApcError
impl Unpin for ApcError
impl !UnwindSafe for ApcError
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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