[][src]Enum fcm::Error

pub enum Error {
    Unauthorized,
    InvalidMessage(String),
    ServerError(Option<RetryAfter>),
}

Fatal errors. Referred from Firebase documentation

Variants

Unauthorized

The sender account used to send a message couldn't be authenticated. Possible causes are:

Authorization header missing or with invalid syntax in HTTP request.

Check that the token you're sending inside the Authentication header is the correct Server key associated with your project. See Checking the validity of a Server key for details. If you are using a legacy server key, you're recommended to upgrade to a new key that has no IP restrictions.

InvalidMessage(String)

Check that the JSON message is properly formatted and contains valid fields (for instance, making sure the right data type is passed in).

ServerError(Option<RetryAfter>)

The server couldn't process the request. Retry the same request, but you must:

Senders that cause problems risk being blacklisted.

Trait Implementations

impl Debug for FcmError[src]

impl Display for FcmError[src]

impl Error for FcmError[src]

impl From<Error> for FcmError[src]

impl PartialEq<FcmError> for FcmError[src]

impl StructuralPartialEq for FcmError[src]

Auto Trait Implementations

impl RefUnwindSafe for FcmError

impl Send for FcmError

impl Sync for FcmError

impl Unpin for FcmError

impl UnwindSafe for FcmError

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.