pub enum ClientError {
Show 13 variants
InvalidUrl(String),
DnsError(Error),
ConnectError(Error),
TlsError(String),
HttpError(HttpError),
TooManyRedirects {
count: u32,
max: u32,
},
Io(Error),
DeadlineExceeded,
ConnectTunnelRefused {
status: u16,
reason: String,
},
InvalidConnectInput(String),
ProxyError(String),
PoolExhausted {
host: String,
port: u16,
},
Cancelled,
}Expand description
Errors that can occur during HTTP client operations.
Variants§
InvalidUrl(String)
Invalid URL.
DnsError(Error)
DNS resolution failed.
ConnectError(Error)
TCP connection failed.
TlsError(String)
TLS handshake failed.
HttpError(HttpError)
HTTP protocol error.
TooManyRedirects
Too many redirects.
Io(Error)
I/O error.
DeadlineExceeded
The request’s effective deadline elapsed before completion (br-asupersync-server-stack-hardening-eeexl1.1.3): the meet of the remaining ambient budget, the client’s configured total request timeout, and any per-call override.
ConnectTunnelRefused
HTTP CONNECT tunnel was rejected by the proxy endpoint.
Fields
InvalidConnectInput(String)
Invalid CONNECT target authority or header input.
ProxyError(String)
Proxy negotiation failed.
PoolExhausted
Connection pool limits prevented a new connection from being opened.
Cancelled
The operation was cancelled via the Cx cancellation protocol.
Implementations§
Source§impl ClientError
impl ClientError
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Returns true if this error represents a cancellation.
Trait Implementations§
Source§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
Source§impl Error for ClientError
impl Error for ClientError
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 ClientError
impl From<Error> for ClientError
Auto Trait Implementations§
impl !RefUnwindSafe for ClientError
impl !UnwindSafe for ClientError
impl Freeze for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl UnsafeUnpin for ClientError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).