pub enum APIError {
    ClientNotReady,
    FailedGetIP(String),
    LoginFailed(String),
    RequestFailed(Error),
    BadParameters,
    AccessDenied,
    NotFound,
    RequestThrottled,
    UnknownError,
    InMaintenance,
    BadResponse(StringStatusCode),
    InvalidParameters(String),
}

Variants

ClientNotReady

API hasn’t been initialized yet (logging in + making keys).

FailedGetIP(String)

Failed to query the current ip address.

LoginFailed(String)

Failed to login to an account, either due to invalid credentials or a server error.

RequestFailed(Error)

Reqwest error

BadParameters

Status code of 400

AccessDenied

Status code of 403

NotFound

Status code of 404

RequestThrottled

Status code of 429

UnknownError

Status code of 500

InMaintenance

Status code of 503

BadResponse(StringStatusCode)

All other cases (edge cases/unknown status codes)

InvalidParameters(String)

From malformed cursors or using invalid leagues

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more