pub enum ApnsError {
ChannelSettingsDecode(Error),
Io(Error),
ApnsClient(Error),
SizeLimit(Error),
ApnsUpstream(Error),
Config(String, String),
NoDeviceToken,
NoReleaseChannel,
InvalidReleaseChannel,
InvalidApsData,
Unregistered,
}
Expand description
Errors that may occur in the Apple Push Notification Service router
Variants§
ChannelSettingsDecode(Error)
Io(Error)
ApnsClient(Error)
SizeLimit(Error)
ApnsUpstream(Error)
Config(String, String)
Configuration error {Type of error}, {Error string}
NoDeviceToken
NoReleaseChannel
InvalidReleaseChannel
InvalidApsData
Unregistered
Implementations§
Trait Implementations§
source§impl Error for ApnsError
impl Error for ApnsError
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 ApiErrorKind
impl From<ApnsError> for ApiErrorKind
source§impl From<ApnsError> for RouterError
impl From<ApnsError> for RouterError
source§impl ReportableError for ApnsError
impl ReportableError for ApnsError
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)>
§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
Auto Trait Implementations§
impl Freeze for ApnsError
impl !RefUnwindSafe for ApnsError
impl Send for ApnsError
impl Sync for ApnsError
impl Unpin for ApnsError
impl !UnwindSafe for ApnsError
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