pub enum HttpClientError {
Http10Send(Http10SendError),
Http11Send(Http11SendError),
Io(Error),
Tls(Error),
UrlMissingHost(String),
UrlUnsupportedScheme(String, String),
UnexpectedRedirect {
url: Url,
code: u16,
},
StreamingNotChunked(u16),
ChunkStream(Http11ChunksReadStreamError),
Transport(Box<dyn Error + Send + Sync>),
}Available on crate feature
client only.Expand description
Errors returned by the client surfaces.
Variants§
Http10Send(Http10SendError)
The HTTP/1.0 send coroutine failed.
Http11Send(Http11SendError)
The HTTP/1.1 send coroutine failed.
Io(Error)
The underlying stream failed to read or write.
Tls(Error)
Available on crate features
native-tls or rustls-aws or rustls-ring only.The TCP connection or the TLS negotiation failed.
UrlMissingHost(String)
The URL to connect to carries no host.
UrlUnsupportedScheme(String, String)
The URL to connect to carries a scheme the client cannot open.
UnexpectedRedirect
The server answered with a redirect the client never follows.
StreamingNotChunked(u16)
The streaming response did not use chunked transfer coding.
ChunkStream(Http11ChunksReadStreamError)
The streaming chunked-body decoder failed.
Transport(Box<dyn Error + Send + Sync>)
The implementor’s own transport failed.
HttpClientStd reports I/O through Self::Io; this variant
exists for implementors whose failures are something else, such
as a JNI upcall or a runtime-specific socket error.
Trait Implementations§
Source§impl Debug for HttpClientError
impl Debug for HttpClientError
Source§impl Display for HttpClientError
impl Display for HttpClientError
Source§impl Error for HttpClientError
impl Error for HttpClientError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for HttpClientError
impl From<Error> for HttpClientError
Source§impl From<Error> for HttpClientError
impl From<Error> for HttpClientError
Source§impl From<Http10SendError> for HttpClientError
impl From<Http10SendError> for HttpClientError
Source§fn from(source: Http10SendError) -> Self
fn from(source: Http10SendError) -> Self
Converts to this type from the input type.
Source§impl From<Http11ChunksReadStreamError> for HttpClientError
impl From<Http11ChunksReadStreamError> for HttpClientError
Source§fn from(source: Http11ChunksReadStreamError) -> Self
fn from(source: Http11ChunksReadStreamError) -> Self
Converts to this type from the input type.
Source§impl From<Http11SendError> for HttpClientError
impl From<Http11SendError> for HttpClientError
Source§fn from(source: Http11SendError) -> Self
fn from(source: Http11SendError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for HttpClientError
impl !UnwindSafe for HttpClientError
impl Freeze for HttpClientError
impl Send for HttpClientError
impl Sync for HttpClientError
impl Unpin for HttpClientError
impl UnsafeUnpin for HttpClientError
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