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

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

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.

SerdeJson(Error)

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(ParseError)

URL parsing error.

Hyper(Error)

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

Io(Error)

IO error.

StatusCode(StatusCode)

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

Api(ApiError)

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

RoomNameParse(RoomNameParseError<'static>)

Error parsing a room name.

Trait Implementations

impl From<ErrorKind> for Error[src]

impl Debug for ErrorKind[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,