Enum threema_gateway::errors::ApiError[][src]

pub enum ApiError {
    BadSenderOrRecipient,
    BadCredentials,
    NoCredits,
    IdNotFound,
    MessageTooLong,
    ServerError,
    BadHashLength,
    BadBlob,
    BadBlobId,
    InvalidMac,
    RequestError(ReqwestError),
    IoError(IoError),
    ParseError(String),
    Other(String),
}

Errors when interacting with the API.

Variants

BadSenderOrRecipient

The recipient identity is invalid or the account is not set up for basic mode

BadCredentials

API identity or secret is incorrect

NoCredits

No credits remain

IdNotFound

Target ID not found

MessageTooLong

Message is too long

ServerError

Internal server error

BadHashLength

Wrong hash length

BadBlob

Bad blob

BadBlobId

Invalid blob ID

InvalidMac

Invalid MAC

RequestError(ReqwestError)

Error when sending request (via reqwest)

IoError(IoError)

Error when reading response

ParseError(String)

Error while parsing response

Other(String)

Other

Trait Implementations

impl Debug for ApiError[src]

impl Display for ApiError[src]

impl Error for ApiError[src]

impl From<Error> for ApiError[src]

impl From<Error> for ApiError[src]

Auto Trait Implementations

impl !RefUnwindSafe for ApiError

impl Send for ApiError

impl Sync for ApiError

impl Unpin for ApiError

impl !UnwindSafe for ApiError

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> Instrument 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.