Enum serenity::Error [] [src]

pub enum Error {
    Client(ClientError),
    Gateway(GatewayError),
    Decode(&'static str, Value),
    Format(FormatError),
    Hyper(HyperError),
    Io(IoError),
    Json(JsonError),
    Num(ParseIntError),
    Other(&'static str),
    Url(String),
    WebSocket(WebSocketError),
}

A common error enum returned by most of the library's functionality within a custom Result.

The most common error types, the ClientError and GatewayError enums, are both wrapped around this in the form of the Client and Gateway variants.

Variants

A rest or client error.

An error with the WebSocket Gateway.

An error while decoding a payload.

There was an error with a format.

An error from the hyper crate.

An std::io error.

An error from the serde_json crate.

An error occurred while parsing an integer.

Some other error. This is only used for "Expected value " errors, when a more detailed error can not be easily provided via the Error::Decode variant.

An error from the url crate.

An error from the rust-websocket crate.

Trait Implementations

impl Debug for Error
[src]

Formats the value using the given formatter.

impl From<FormatError> for Error
[src]

Performs the conversion.

impl From<IoError> for Error
[src]

Performs the conversion.

impl From<HyperError> for Error
[src]

Performs the conversion.

impl From<JsonError> for Error
[src]

Performs the conversion.

impl From<ParseIntError> for Error
[src]

Performs the conversion.

impl From<WebSocketError> for Error
[src]

Performs the conversion.

impl Display for Error
[src]

Formats the value using the given formatter.

impl StdError for Error
[src]

A short description of the error. Read more

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