Enum screeps_api::error::ErrorKind [] [src]

pub enum ErrorKind {
    Unauthorized,
    SerdeJson(Error),
    Url(ParseError),
    Hyper(Error),
    Io(Error),
    StatusCode(StatusCode),
    Api(ApiError),
    RoomNameParse(RoomNameParseError<'static>),
    // some variants omitted
}

Possible error types for library errors.

Variants

Unauthorized access. This is caused by either attempting to access a login-only endpoint without a token, attempting to access a login-only endpoint with an expired token, or providing incorrect login details to the login endpoint.

Error parsing a server response. This is most likely caused by the server providing unparsable JSON, but it could also be the server's API response structure has changed and no longer matches the expected data structure.

URL parsing error.

Error connecting to the server, or error parsing a URL provided.

IO error.

Error for when the server responds with a non-success HTTP status code.

API Error: when the server responds with a successful HTTP response, but the returned format is not what we expected.

Error parsing a room name.

Trait Implementations

impl Debug for ErrorKind
[src]

[src]

Formats the value using the given formatter.