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
NotOk(i32)
The server responded with an "ok" code which was not 1
.
ServerDown
The server is offline.
InvalidRoom
A known response to a query about an invalid room.
InvalidShard
A known response to a query about an invalid shard.
ResultNotFound
The data being requested was not found.
UserNotFound
The user whose data was being requested was not found.
RegistrationNotAllowed
Registration is not allowed.
UsernameAlreadyExists
The username that was attempted to register already existed.
InvalidParameters
The API returned that invalid parameters were passed.
GenericError(String)
An error found from the API. Data is the raw error string reported by the server.
MissingField(&'static str)
The server response was missing a top-level JSON field that was expected.
MalformedResponse(String)
A malformed response, including a formatted String description of the error.
Trait Implementations
impl Debug for ApiError
[src]
impl Clone for ApiError
[src]
fn clone(&self) -> ApiError
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Display for ApiError
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more