pub enum ErrorKind {
Show 16 variants
ConnectNotSupported,
ConnectError {
status_code: StatusCode,
body: Vec<u8>,
},
Http(Error),
Io(Error),
InvalidBaseUrl,
InvalidUrlHost,
InvalidUrlPort,
InvalidResponse(InvalidResponseKind),
TooManyRedirections,
StatusCode(StatusCode),
Json(Error),
UrlEncoded(Error),
Tls(Error),
InvalidDNSName(String),
InvalidMimeType(String),
TlsDisabled,
}
Expand description
Common errors that can occur during HTTP requests.
Variants§
ConnectNotSupported
CONNECT is not supported.
ConnectError
Could not connect to proxy with CONNECT method.
Fields
§
status_code: StatusCode
Status code from the proxy.
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
Json(Error)
JSON decoding/encoding error.
UrlEncoded(Error)
Form-URL encoding error.
Tls(Error)
TLS error encountered while connecting to an https server.
InvalidDNSName(String)
Invalid DNS name used for TLS certificate verification
InvalidMimeType(String)
Invalid mime type in a Multipart form
TlsDisabled
TLS was not enabled by features.
Trait Implementations§
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