pub enum HttpClientStdError {
Http10Send(Http10SendError),
Http11Send(Http11SendError),
Io(Error),
Tls(Error),
UrlMissingHost(String),
UrlUnsupportedScheme(String, String),
UnexpectedRedirect {
url: Url,
code: u16,
},
StreamingNotChunked(u16),
ChunkStream(Http11ChunksReadStreamError),
}Available on crate feature
client only.Expand description
Errors returned by HttpClientStd.
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)
Available on crate features
native-tls or rustls-aws or rustls-ring only.The URL to connect to carries no host.
UrlUnsupportedScheme(String, String)
Available on crate features
native-tls or rustls-aws or rustls-ring only.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.
Trait Implementations§
Source§impl Debug for HttpClientStdError
impl Debug for HttpClientStdError
Source§impl Display for HttpClientStdError
impl Display for HttpClientStdError
Source§impl Error for HttpClientStdError
impl Error for HttpClientStdError
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 HttpClientStdError
impl From<Error> for HttpClientStdError
Source§impl From<Error> for HttpClientStdError
impl From<Error> for HttpClientStdError
Source§impl From<Http10SendError> for HttpClientStdError
impl From<Http10SendError> for HttpClientStdError
Source§fn from(source: Http10SendError) -> Self
fn from(source: Http10SendError) -> Self
Converts to this type from the input type.
Source§impl From<Http11ChunksReadStreamError> for HttpClientStdError
impl From<Http11ChunksReadStreamError> for HttpClientStdError
Source§fn from(source: Http11ChunksReadStreamError) -> Self
fn from(source: Http11ChunksReadStreamError) -> Self
Converts to this type from the input type.
Source§impl From<Http11SendError> for HttpClientStdError
impl From<Http11SendError> for HttpClientStdError
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 HttpClientStdError
impl !UnwindSafe for HttpClientStdError
impl Freeze for HttpClientStdError
impl Send for HttpClientStdError
impl Sync for HttpClientStdError
impl Unpin for HttpClientStdError
impl UnsafeUnpin for HttpClientStdError
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