Enum web_push::WebPushError
[−]
[src]
pub enum WebPushError {
Unspecified,
Unauthorized,
BadRequest(Option<String>),
ServerError(Option<Duration>),
NotImplemented,
InvalidUri,
TimeoutError,
EndpointNotValid,
EndpointNotFound,
PayloadTooLarge,
TlsError,
InvalidPackageName,
InvalidTtl,
MissingCryptoKeys,
InvalidCryptoKeys,
InvalidResponse,
Other(String),
}Variants
UnspecifiedAn 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
NotImplementedThe feature is not implemented yet
InvalidUriThe provided URI is invalid
TimeoutErrorThe request timed out
EndpointNotValidThe URL specified is no longer valid and should no longer be used
EndpointNotFoundThe URL specified is invalid and should not be used again
PayloadTooLargeMaximum allowed payload size is 3800 characters
TlsErrorCould not initialize a TLS connection
InvalidPackageNameMake sure the message was addressed to a registration token whose package name matches the value passed in the request (Google).
InvalidTtlThe TTL value provided was not valid or was not provided
MissingCryptoKeysThe request was missing required crypto keys
InvalidCryptoKeysOne or more of the crytpo key elements are invalid.
InvalidResponseCorrupted response data
Other(String)
Methods
impl WebPushError[src]
fn short_description(&self) -> &'static str[src]
Trait Implementations
impl PartialEq for WebPushError[src]
fn eq(&self, __arg_0: &WebPushError) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &WebPushError) -> bool[src]
This method tests for !=.
impl Debug for WebPushError[src]
impl From<JsonError> for WebPushError[src]
fn from(_: JsonError) -> WebPushError[src]
Performs the conversion.
impl From<FromUtf8Error> for WebPushError[src]
fn from(_: FromUtf8Error) -> WebPushError[src]
Performs the conversion.
impl From<UriError> for WebPushError[src]
fn from(_: UriError) -> WebPushError[src]
Performs the conversion.
impl From<TimeoutError<WebPushResponse>> for WebPushError[src]
fn from(_: TimeoutError<WebPushResponse>) -> WebPushError[src]
Performs the conversion.
impl From<Unspecified> for WebPushError[src]
fn from(_: Unspecified) -> WebPushError[src]
Performs the conversion.
impl From<Error> for WebPushError[src]
fn from(_: Error) -> WebPushError[src]
Performs the conversion.
impl Error for WebPushError[src]
fn description(&self) -> &str[src]
A short description of the error. Read more
fn cause(&self) -> Option<&Error>[src]
The lower-level cause of this error, if any. Read more
impl Display for WebPushError[src]
fn fmt(&self, f: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl<'a> From<&'a GcmError> for WebPushError[src]
fn from(e: &GcmError) -> WebPushError[src]
Performs the conversion.