#[non_exhaustive]pub struct TransportError { /* private fields */ }Expand description
Why no response arrived, or why its body could not be read.
kind says where the exchange broke, and the boxed source is
the transport’s own error, kept for its message and its chain. A custom
HttpTransport builds one with new. Its class is
Class::Network for every kind but TransportKind::Request, a request
that could not be built, which is Class::InvalidRequest.
Implementations§
Trait Implementations§
Source§impl Classify for TransportError
impl Classify for TransportError
Source§fn is_fault(&self) -> bool
fn is_fault(&self) -> bool
Whether this error is a fault, rather than the venue answering as
designed. False only for defined outcomes, such as a Fill-And-Kill order
that matched nothing, or a venue that does not serve the caller’s
region. Alerting should key on this; retrying should not.
Source§fn retry_after(&self) -> Option<Duration>
fn retry_after(&self) -> Option<Duration>
How long the server asked the caller to wait. Defaults to the class’s
own; an error whose wait outlives its class, such as a ban that says
when it lifts, overrides it. Never
Some of zero.Source§fn is_retriable(&self) -> bool
fn is_retriable(&self) -> bool
Whether retrying could plausibly succeed, read from the class (see
Class::is_retriable).Source§impl Debug for TransportError
impl Debug for TransportError
Source§impl Display for TransportError
impl Display for TransportError
Source§impl Error for TransportError
impl Error for TransportError
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<TransportError> for ApiError
impl From<TransportError> for ApiError
Source§fn from(source: TransportError) -> Self
fn from(source: TransportError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for TransportError
impl !UnwindSafe for TransportError
impl Freeze for TransportError
impl Send for TransportError
impl Sync for TransportError
impl Unpin for TransportError
impl UnsafeUnpin 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
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.