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 str, Value), Status(StatusCode, Option<Value>), RateLimited(u64), Protocol(&'static str), Command(&'static str, Output), Other(&'static str), }
Discord API error type.
Variants
Hyper(HyperError)
A hyper
crate error
Chrono(ChronoError)
A chrono
crate error
Json(JsonError)
A serde_json
crate error
WebSocket(WebSocketError)
A websocket
crate error
Io(IoError)
A std::io
module error
Opus(OpusError)
An error in the Opus library, with the function name and error code
Closed(Option<u16>, String)
A websocket connection was closed, possibly with a message
Decode(&'static str, Value)
A json decoding error, with a description and the offending value
Status(StatusCode, Option<Value>)
A generic non-success response from the REST API
RateLimited(u64)
A rate limit error, with how many milliseconds to wait before retrying
Protocol(&'static str)
A Discord protocol error, with a description
Command(&'static str, Output)
A command execution failure, with a command name and output
Other(&'static str)
A miscellaneous error, with a description
Trait Implementations
impl Debug for Error
[src]
impl From<IoError> for Error
[src]
impl From<HyperError> for Error
[src]
fn from(err: HyperError) -> Error
Performs the conversion.
impl From<ChronoError> for Error
[src]
fn from(err: ChronoError) -> Error
Performs the conversion.