pub enum FcmError {
CredentialDecode(Error),
OAuthClientBuild(Error),
OAuthToken(Error),
DeserializeResponse(Error),
InvalidResponse(Error, String, StatusCode),
EmptyResponse(StatusCode),
NoOAuthToken,
NoRegistrationToken,
NoAppId,
InvalidAppId(String),
}
Expand description
Errors that may occur in the Firebase Cloud Messaging router
Variants§
CredentialDecode(Error)
OAuthClientBuild(Error)
OAuthToken(Error)
DeserializeResponse(Error)
InvalidResponse(Error, String, StatusCode)
EmptyResponse(StatusCode)
NoOAuthToken
NoRegistrationToken
NoAppId
InvalidAppId(String)
Implementations§
Trait Implementations§
source§impl Error for FcmError
impl Error for FcmError
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<FcmError> for ApiErrorKind
impl From<FcmError> for ApiErrorKind
source§impl From<FcmError> for RouterError
impl From<FcmError> for RouterError
source§impl ReportableError for FcmError
impl ReportableError for FcmError
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 FcmError
impl !RefUnwindSafe for FcmError
impl Send for FcmError
impl Sync for FcmError
impl Unpin for FcmError
impl !UnwindSafe for FcmError
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