pub enum PushRejection {
DeviceNotRegistered,
MessageTooBig,
MessageRateExceeded,
InvalidCredentials,
ProviderError,
Other(String),
}Expand description
Why a provider rejected one notification.
The variants cover the vocabulary push providers actually return. Anything
outside it becomes PushRejection::Other with the provider’s own string,
so a new provider code is visible in logs instead of being silently dropped.
Variants§
DeviceNotRegistered
The token no longer belongs to an installed app.
This is permanent. Delete the token; see PushOutcome::is_token_dead.
MessageTooBig
The serialized notification exceeded the provider’s size limit.
MessageRateExceeded
Too many notifications were sent to this token in too short a window.
InvalidCredentials
The provider credential was missing, malformed, or rejected.
ProviderError
The upstream platform (APNs, FCM) refused the notification.
Other(String)
A provider code outside the known vocabulary.
Implementations§
Source§impl PushRejection
impl PushRejection
Sourcepub const fn is_retryable(&self) -> bool
pub const fn is_retryable(&self) -> bool
Returns whether resending the same notification can succeed.
Only PushRejection::MessageRateExceeded and
PushRejection::ProviderError are worth another attempt. A dead
token, an oversized payload, and a rejected credential all fail the same
way again.
Trait Implementations§
Source§impl Clone for PushRejection
impl Clone for PushRejection
Source§impl Debug for PushRejection
impl Debug for PushRejection
impl Eq for PushRejection
Source§impl PartialEq for PushRejection
impl PartialEq for PushRejection
impl StructuralPartialEq for PushRejection
Auto Trait Implementations§
impl Freeze for PushRejection
impl RefUnwindSafe for PushRejection
impl Send for PushRejection
impl Sync for PushRejection
impl Unpin for PushRejection
impl UnsafeUnpin for PushRejection
impl UnwindSafe for PushRejection
Blanket Implementations§
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§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.