Enum discord::Error [] [src]

pub enum Error {
    Hyper(HyperError),
    Chrono(ChronoError),
    Json(JsonError),
    WebSocket(WebSocketError),
    Io(IoError),
    Opus(OpusError),
    Closed(Option<u16>, String),
    Decode(&'static strValue),
    Status(StatusCodeOption<Value>),
    RateLimited(u64),
    Protocol(&'static str),
    Command(&'static strOutput),
    Other(&'static str),
}

Discord API error type.

Variants

A hyper crate error

A chrono crate error

A serde_json crate error

A websocket crate error

A std::io module error

An error in the Opus library, with the function name and error code

A websocket connection was closed, possibly with a message

A json decoding error, with a description and the offending value

A generic non-success response from the REST API

A rate limit error, with how many milliseconds to wait before retrying

A Discord protocol error, with a description

A command execution failure, with a command name and output

A miscellaneous error, with a description

Trait Implementations

impl Debug for Error
[src]

Formats the value using the given formatter.

impl From<IoError> for Error
[src]

Performs the conversion.

impl From<HyperError> for Error
[src]

Performs the conversion.

impl From<ChronoError> for Error
[src]

Performs the conversion.

impl From<JsonError> for Error
[src]

Performs the conversion.

impl From<WebSocketError> for Error
[src]

Performs the conversion.

impl From<OpusError> for Error
[src]

Performs the conversion.

impl Display for Error
[src]

Formats the value using the given formatter. Read more

impl StdError for Error
[src]

A short description of the error. Read more

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