pub enum TransportError {
Timeout(String),
Connect(String),
Tls(String),
BodyTooLarge,
Other(String),
}Expand description
Why a request produced no response.
Variants§
Timeout(String)
The request did not finish within its timeout. Carries the URL.
Connect(String)
The connection could not be made or the request could not be sent.
Tls(String)
The TLS handshake or certificate check failed.
BodyTooLarge
The body exceeded the cap and the transport refuses to truncate it. The shipped transports truncate instead and never return this.
Other(String)
Anything else, with the transport’s own description.
Implementations§
Source§impl TransportError
impl TransportError
Sourcepub fn is_transient(&self) -> bool
pub fn is_transient(&self) -> bool
Is the failure worth retrying? Timeouts and connection-level failures are; TLS, oversize and other errors are final. This is the classification the native path has always used.
Trait Implementations§
Source§impl Clone for TransportError
impl Clone for TransportError
Source§impl Debug for TransportError
impl Debug for TransportError
Source§impl Display for TransportError
impl Display for TransportError
impl Eq for TransportError
Source§impl Error for TransportError
impl Error for TransportError
1.30.0 · 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 PartialEq for TransportError
impl PartialEq for TransportError
impl StructuralPartialEq for TransportError
Auto Trait Implementations§
impl Forget for TransportError
impl Freeze for TransportError
impl Move for TransportError
impl RefUnwindSafe for TransportError
impl Send for TransportError
impl Sync for TransportError
impl Unpin for TransportError
impl UnsafeUnpin for TransportError
impl UnwindSafe for TransportError
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