Enum toornament::Error
[−]
[src]
pub enum Error { Reqwest(ReqwestError), Json(JsonError), Io(IoError), Date(ParseError), Status(StatusCode), RateLimited(u64), Protocol(&'static str), Command(&'static str, Output), Other(&'static str), }
Toornament API error type.
Variants
Reqwest(ReqwestError)
A reqwest
crate error
Json(JsonError)
A serde_json
crate error
Io(IoError)
A std::io
module error
Date(ParseError)
A date parse error (chrono
crate error)
Status(StatusCode)
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 Toornament 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<ReqwestError> for Error
[src]
fn from(err: ReqwestError) -> Error
Performs the conversion.
impl From<JsonError> for Error
[src]
impl From<ParseError> for Error
[src]
fn from(err: ParseError) -> Error
Performs the conversion.