pub enum ErrorKind {
Show 15 variants
ConnectNotSupported,
ConnectError {
status_code: StatusCode,
body: Vec<u8>,
},
Http(Error),
Io(Error),
InvalidBaseUrl,
InvalidUrlHost,
InvalidUrlPort,
InvalidResponse(InvalidResponseKind),
TooManyRedirections,
StatusCode(StatusCode),
UrlEncoded(Error),
InvalidDNSName(InvalidDNSNameError),
InvalidMimeType(String),
TlsDisabled,
WebPKI(Error),
}
Expand description
Common errors that can occur during HTTP requests.
Variants
ConnectNotSupported
CONNECT is not supported.
ConnectError
Fields
status_code: StatusCode
Status code from the proxy.
Could not connect to proxy with CONNECT method.
Http(Error)
Error generated by the http
crate.
Io(Error)
IO Error
InvalidBaseUrl
Invalid base URL given to the Request.
InvalidUrlHost
An URL with an invalid host was found while processing the request.
InvalidUrlPort
The URL scheme is unknown and the port is missing.
InvalidResponse(InvalidResponseKind)
Server sent an invalid response.
TooManyRedirections
Too many redirections
StatusCode(StatusCode)
Status code indicates failure
UrlEncoded(Error)
Form-URL encoding error.
InvalidDNSName(InvalidDNSNameError)
Invalid DNS name used for TLS certificate verification
InvalidMimeType(String)
Invalid mime type in a Multipart form
TlsDisabled
TLS was not enabled by features.
WebPKI(Error)
WebPKI error.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl !UnwindSafe for ErrorKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more