pub enum ErrorKind {
InvalidUrl,
UnknownScheme,
Dns,
ConnectionFailed,
TooManyRedirects,
BadStatus,
BadHeader,
Io,
RequestInterrupted,
StatusCode,
}Expand description
The kind of error that happened when a request is performed.
In case of a statues code error (>= 400), the kind is going to be StatusCode. All other kinds are
related to the transport.
Variants§
InvalidUrl
The url could not be understood.
UnknownScheme
The url scheme could not be understood.
Dns
DNS lookup failed.
ConnectionFailed
Connection to server failed.
TooManyRedirects
Too many redirects.
BadStatus
A status line we don’t understand (e.g. HTTP/1.1 200 OK).
BadHeader
A header line that couldn’t be parsed.
Io
Some unspecified std::io::Error.
RequestInterrupted
There was an external failure before the request could finish.
StatusCode
HTTP status code indicating an error (e.g. 4xx, 5xx) Read the inner response body for details.
Trait Implementations§
Source§impl From<HttpErrorKind> for ErrorKind
impl From<HttpErrorKind> for ErrorKind
Source§fn from(value: HttpErrorKind) -> Self
fn from(value: HttpErrorKind) -> Self
Converts to this type from the input type.
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more