pub enum ErrorReason {
Show 32 variants
BadCollapseId,
BadDeviceToken,
BadExpirationDate,
BadMessageId,
BadPriority,
BadTopic,
DeviceTokenNotForTopic,
DuplicateHeaders,
IdleTimeout,
InvalidPushType,
MissingDeviceToken,
MissingTopic,
PayloadEmpty,
TopicDisallowed,
BadCertificate,
BadCertificateEnvironment,
ExpiredProviderToken,
Forbidden,
InvalidProviderToken,
MissingProviderToken,
UnrelatedKeyIdInToken,
BadEnvironmentKeyIdInToken,
BadPath,
MethodNotAllowed,
ExpiredToken,
Unregistered,
PayloadTooLarge,
TooManyProviderTokenUpdates,
TooManyRequests,
InternalServerError,
ServiceUnavailable,
Shutdown,
}Expand description
A description what went wrong with the push notification.
Variants§
BadCollapseId
The collapse identifier exceeds the maximum allowed size.
BadDeviceToken
The specified device token is invalid. Verify that the request contains a valid token and that the token matches the environment.
BadExpirationDate
The apns-expiration value is invalid.
BadMessageId
The apns-id value is invalid.
BadPriority
The apns-priority value is invalid.
BadTopic
The apns-topic value is invalid.
DeviceTokenNotForTopic
The device token doesn’t match the specified topic.
DuplicateHeaders
One or more headers are repeated.
IdleTimeout
Idle timeout.
InvalidPushType
The apns-push-type value is invalid.
MissingDeviceToken
The device token isn’t specified in the request :path. Verify that the :path header contains the device token.
MissingTopic
The apns-topic header of the request isn’t specified and is required. The apns-topic header is mandatory when the client is connected using a certificate that supports multiple topics.
PayloadEmpty
The message payload is empty.
TopicDisallowed
Pushing to this topic is not allowed.
BadCertificate
The certificate is invalid.
BadCertificateEnvironment
The client certificate doesn’t match the environment.
ExpiredProviderToken
The provider token is stale and a new token should be generated.
Forbidden
The specified action is not allowed.
InvalidProviderToken
The provider token is not valid, or the token signature can’t be verified.
MissingProviderToken
No provider certificate was used to connect to APNs, and the authorization header is missing or no provider token is specified.
The key ID in the provider token isn’t related to the key ID of the token used in the first push of this connection. To use this token, open a new connection.
BadEnvironmentKeyIdInToken
The key ID in the provider token doesn’t match the environment.
BadPath
The request contained an invalid :path value.
MethodNotAllowed
The specified :method value isn’t POST.
ExpiredToken
The device token has expired.
Unregistered
The device token is inactive for the specified topic. There is no need to send further pushes to the same device token, unless your application retrieves the same device token, refer to Registering your app with APNs
PayloadTooLarge
The message payload is too large. For information about the allowed payload size, refer to Create a POST request to APNs in Sending notification requests to APNs.
TooManyProviderTokenUpdates
The provider’s authentication token is being updated too often. Update the authentication token no more than once every 20 minutes.
TooManyRequests
Too many requests were made consecutively to the same device token.
InternalServerError
An internal server error occurred.
The service is unavailable.
Shutdown
The APNs server is shutting down.
Trait Implementations§
Source§impl Debug for ErrorReason
impl Debug for ErrorReason
Source§impl<'de> Deserialize<'de> for ErrorReason
impl<'de> Deserialize<'de> for ErrorReason
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ErrorReason
impl Display for ErrorReason
Source§impl PartialEq for ErrorReason
impl PartialEq for ErrorReason
impl Eq for ErrorReason
impl StructuralPartialEq for ErrorReason
Auto Trait Implementations§
impl Freeze for ErrorReason
impl RefUnwindSafe for ErrorReason
impl Send for ErrorReason
impl Sync for ErrorReason
impl Unpin for ErrorReason
impl UnwindSafe for ErrorReason
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.