pub enum RouterError {
Apns(ApnsError),
Fcm(FcmError),
Stub(StubError),
SaveDb(DbError, Option<String>),
UserWasDeleted,
TooMuchData(usize),
Authentication,
RequestTimeout,
Connect(Error),
NotFound,
}
Variants§
Apns(ApnsError)
Fcm(FcmError)
Stub(StubError)
SaveDb(DbError, Option<String>)
UserWasDeleted
TooMuchData(usize)
Authentication
RequestTimeout
Connect(Error)
NotFound
Implementations§
source§impl RouterError
impl RouterError
Trait Implementations§
source§impl Debug for RouterError
impl Debug for RouterError
source§impl Display for RouterError
impl Display for RouterError
source§impl Error for RouterError
impl Error for RouterError
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 From<ApnsError> for RouterError
impl From<ApnsError> for RouterError
source§impl From<FcmError> for RouterError
impl From<FcmError> for RouterError
source§impl From<RouterError> for ApiErrorKind
impl From<RouterError> for ApiErrorKind
source§fn from(source: RouterError) -> Self
fn from(source: RouterError) -> Self
Converts to this type from the input type.
source§impl From<StubError> for RouterError
impl From<StubError> for RouterError
source§impl ReportableError for RouterError
impl ReportableError for RouterError
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.
source§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 extras(&self) -> Vec<(&str, String)>
fn extras(&self) -> Vec<(&str, String)>
Experimental: return key value pairs for Sentry Event’s extra data
TODO: should probably return Vec<(&str, Value)> or Vec<(String, Value)>
Experimental: return tag key value pairs for metrics and Sentry
Auto Trait Implementations§
impl Freeze for RouterError
impl !RefUnwindSafe for RouterError
impl Send for RouterError
impl Sync for RouterError
impl Unpin for RouterError
impl !UnwindSafe for RouterError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP