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
Client(ClientError)
Gateway(GatewayError)
An error with the WebSocket Gateway
.
Decode(&'static str, Value)
An error while decoding a payload.
Format(FormatError)
There was an error with a format.
Hyper(HyperError)
An error from the hyper
crate.
Io(IoError)
An std::io
error.
Json(JsonError)
An error from the serde_json
crate.
Num(ParseIntError)
An error occurred while parsing an integer.
Other(&'static str)
Some other error. This is only used for "Expected value Error::Decode
variant.
Url(String)
An error from the url
crate.
WebSocket(WebSocketError)
An error from the rust-websocket
crate.
Trait Implementations
impl Debug for Error
[src]
impl From<FormatError> for Error
[src]
fn from(e: FormatError) -> Error
Performs the conversion.
impl From<IoError> for Error
[src]
impl From<HyperError> for Error
[src]
fn from(e: HyperError) -> Error
Performs the conversion.
impl From<JsonError> for Error
[src]
impl From<ParseIntError> for Error
[src]
fn from(e: ParseIntError) -> Error
Performs the conversion.