Enum discord::Error
[−]
[src]
pub enum Error { Hyper(HyperError), Json(JsonError), WebSocket(WebSocketError), Io(IoError), Opus(OpusError), Closed(Option<u16>, Vec<u8>), Decode(&'static str, Value), Status(StatusCode, Option<Value>), RateLimited(u64), Protocol(&'static str), Other(&'static str), }
Discord API error type.
Variants
Hyper | A | |
Json | A | |
WebSocket | A | |
Io | A | |
Opus | An error in the Opus library, with the function name and error code | |
Closed | A websocket connection was closed, possibly with a message | |
Decode | A json decoding error, with a description and the offending value | |
Status | A generic non-success response from the REST API | |
RateLimited | A rate limit error, with how many milliseconds to wait before retrying | |
Protocol | A Discord protocol error, with a description | |
Other | A miscellaneous error, with a description |
Trait Implementations
impl From<IoError> for Error
[src]
impl From<HyperError> for Error
[src]
fn from(err: HyperError) -> Error
Performs the conversion.
impl From<JsonError> for Error
[src]
impl From<WebSocketError> for Error
[src]
impl From<OpusError> for Error
[src]
impl From<BoError> for Error
[src]
impl Display for Error
[src]
impl StdError for Error
[src]
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&StdError>
The lower-level cause of this error, if any.