Enum xkcd::HttpRequestError
[−]
[src]
pub enum HttpRequestError {
Io(Error),
NotFound(Url),
Other(Box<StdError>),
Utf8(Utf8Error),
}Represents errors which occur when sending an HTTP request to the XKCD API.
Variants
Io(Error)An error occuring during network IO operations.
NotFound(Url)Error which occurs when a resource was not found at the specified URL.
Other(Box<StdError>)Any other error occuring during an HTTP request.
Utf8(Utf8Error)Error while parsing bytes as a UTF-8 string.
Methods
impl HttpRequestError[src]
pub fn not_found(url: Url) -> HttpRequestError[src]
Create an error from when the specified resource was not found.
Trait Implementations
impl Debug for HttpRequestError[src]
impl Display for HttpRequestError[src]
fn fmt(&self, f: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl StdError for HttpRequestError[src]
fn description(&self) -> &str[src]
A short description of the error. Read more
fn cause(&self) -> Option<&StdError>[src]
The lower-level cause of this error, if any. Read more
impl From<Error> for HttpRequestError[src]
fn from(error: Error) -> HttpRequestError[src]
Performs the conversion.
impl From<Utf8Error> for HttpRequestError[src]
fn from(error: Utf8Error) -> HttpRequestError[src]
Performs the conversion.
impl From<Error> for HttpRequestError[src]
fn from(error: Error) -> HttpRequestError[src]
Performs the conversion.