Enum screeps_api::error::ApiError [] [src]

pub enum ApiError {
    NotOk(i32),
    ServerDown,
    InvalidRoom,
    InvalidShard,
    ResultNotFound,
    UserNotFound,
    RegistrationNotAllowed,
    UsernameAlreadyExists,
    InvalidParameters,
    GenericError(String),
    MissingField(&'static str),
    MalformedResponse(String),
    // some variants omitted
}

Error representing some abnormal response from the API.

Variants

The server responded with an "ok" code which was not 1.

The server is offline.

A known response to a query about an invalid room.

A known response to a query about an invalid shard.

The data being requested was not found.

The user whose data was being requested was not found.

Registration is not allowed.

The username that was attempted to register already existed.

The API returned that invalid parameters were passed.

An error found from the API. Data is the raw error string reported by the server.

The server response was missing a top-level JSON field that was expected.

A malformed response, including a formatted String description of the error.

Trait Implementations

impl Debug for ApiError
[src]

[src]

Formats the value using the given formatter.

impl Clone for ApiError
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Display for ApiError
[src]

[src]

Formats the value using the given formatter. Read more

impl StdError for ApiError
[src]

[src]

A short description of the error. Read more

[src]

The lower-level cause of this error, if any. Read more