Enum web_push::WebPushError
source · pub enum WebPushError {
Show 20 variants
Unspecified,
Unauthorized,
BadRequest(Option<String>),
ServerError(Option<Duration>),
NotImplemented,
InvalidUri,
EndpointNotValid,
EndpointNotFound,
PayloadTooLarge,
TlsError,
SslError,
IoError,
InvalidPackageName,
InvalidTtl,
InvalidTopic,
MissingCryptoKeys,
InvalidCryptoKeys,
InvalidResponse,
InvalidClaims,
Other(String),
}
Variants§
Unspecified
An unknown error happened encrypting the message,
Please provide valid credentials to send the notification
BadRequest(Option<String>)
Request was badly formed
ServerError(Option<Duration>)
Contains an optional Duration
, until the user can retry the request
NotImplemented
The feature is not implemented yet
InvalidUri
The provided URI is invalid
EndpointNotValid
The URL specified is no longer valid and should no longer be used
EndpointNotFound
The URL specified is invalid and should not be used again
PayloadTooLarge
Maximum allowed payload size is 3800 characters
TlsError
Could not initialize a TLS connection
SslError
Error in SSL signing
IoError
Error in reading a file
InvalidPackageName
Make sure the message was addressed to a registration token whose package name matches the value passed in the request (Google).
InvalidTtl
The TTL value provided was not valid or was not provided
InvalidTopic
The Topic value provided was invalid
MissingCryptoKeys
The request was missing required crypto keys
InvalidCryptoKeys
One or more of the crypto key elements are invalid.
InvalidResponse
Corrupted response data
InvalidClaims
A claim had invalid data
Other(String)
Implementations§
source§impl WebPushError
impl WebPushError
pub fn short_description(&self) -> &'static str
Trait Implementations§
source§impl Clone for WebPushError
impl Clone for WebPushError
source§fn clone(&self) -> WebPushError
fn clone(&self) -> WebPushError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WebPushError
impl Debug for WebPushError
source§impl<'de> Deserialize<'de> for WebPushError
impl<'de> Deserialize<'de> for WebPushError
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 WebPushError
impl Display for WebPushError
source§impl Error for WebPushError
impl Error for WebPushError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<DecodeError> for WebPushError
impl From<DecodeError> for WebPushError
source§fn from(_: DecodeError) -> WebPushError
fn from(_: DecodeError) -> WebPushError
source§impl From<Error> for WebPushError
impl From<Error> for WebPushError
source§fn from(_: IoError) -> WebPushError
fn from(_: IoError) -> WebPushError
source§impl From<Error> for WebPushError
impl From<Error> for WebPushError
source§fn from(_: JsonError) -> WebPushError
fn from(_: JsonError) -> WebPushError
source§impl From<Error> for WebPushError
impl From<Error> for WebPushError
source§impl From<FromUtf8Error> for WebPushError
impl From<FromUtf8Error> for WebPushError
source§fn from(_: FromUtf8Error) -> WebPushError
fn from(_: FromUtf8Error) -> WebPushError
source§impl From<InvalidUri> for WebPushError
impl From<InvalidUri> for WebPushError
source§fn from(_: InvalidUri) -> WebPushError
fn from(_: InvalidUri) -> WebPushError
source§impl Hash for WebPushError
impl Hash for WebPushError
source§impl Ord for WebPushError
impl Ord for WebPushError
source§fn cmp(&self, other: &WebPushError) -> Ordering
fn cmp(&self, other: &WebPushError) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for WebPushError
impl PartialEq for WebPushError
source§fn eq(&self, other: &WebPushError) -> bool
fn eq(&self, other: &WebPushError) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for WebPushError
impl PartialOrd for WebPushError
source§fn partial_cmp(&self, other: &WebPushError) -> Option<Ordering>
fn partial_cmp(&self, other: &WebPushError) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more