pub enum NetworkError {
HttpTimeout,
ConnectionReset,
HttpStatus(u16),
DnsFailure(String),
TlsError(String),
Other(String),
}Expand description
Classification of network failures encountered while decoding from an HTTP(S) source.
Only available with the http feature.
Variants§
HttpTimeout
The request exceeded its configured timeout.
ConnectionReset
The connection was reset by the peer mid-transfer.
HttpStatus(u16)
The server returned a non-success status code.
DnsFailure(String)
DNS resolution failed for the request host.
TlsError(String)
The TLS handshake or certificate validation failed.
Other(String)
Any other transport error, carrying its description.
Implementations§
Source§impl NetworkError
impl NetworkError
Sourcepub fn is_retriable(&self) -> bool
pub fn is_retriable(&self) -> bool
Returns true when retrying the operation may succeed (transient
timeouts, connection resets, and 408/429/5xx statuses).
Trait Implementations§
Source§impl Clone for NetworkError
impl Clone for NetworkError
Source§fn clone(&self) -> NetworkError
fn clone(&self) -> NetworkError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NetworkError
impl Debug for NetworkError
Source§impl Display for NetworkError
Available on crate feature http only.
impl Display for NetworkError
Available on crate feature
http only.impl Eq for NetworkError
Source§impl From<Error> for NetworkError
Available on crate feature http only.
impl From<Error> for NetworkError
Available on crate feature
http only.Source§impl PartialEq for NetworkError
impl PartialEq for NetworkError
Source§fn eq(&self, other: &NetworkError) -> bool
fn eq(&self, other: &NetworkError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NetworkError
Auto Trait Implementations§
impl Freeze for NetworkError
impl RefUnwindSafe for NetworkError
impl Send for NetworkError
impl Sync for NetworkError
impl Unpin for NetworkError
impl UnsafeUnpin for NetworkError
impl UnwindSafe for NetworkError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more