#[non_exhaustive]pub enum TransportErrorClass {
Timeout,
Connect,
Redirect,
Decode,
Body,
Builder,
Request,
Status,
Upgrade,
ResponseTooLarge,
Other,
}Expand description
Production HTTP transport seam and its typed surfaces.
HttpTransport is the async injection point downstream clients
consume; TransportResponse is its success envelope (2xx status,
redacted headers, body); TransportError is its typed failure
surface, and TransportErrorClass is the label telemetry and retry
layers use to partition REST-transport failures without parsing error
messages. The native default implementation is ReqwestTransport;
the browser default lives in cow-sdk-core (transport::fetch).
REST-transport error classification shared across transport-capable crates.
Built by classifying a reqwest::Error through the documented partition
(is_timeout, is_connect, is_redirect, is_decode, is_body,
is_builder, is_request, is_status, fallthrough). The
ResponseTooLarge class is the exception: it is
produced by the transport’s own response-size guard rather than by
reqwest classification. Downstream error surfaces pair this enum with a
redacted detail string to produce the public Transport { class, detail }
variant shape.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Timeout
The request timed out before a response was received.
Connect
The request could not establish a connection to the remote host.
Redirect
The request hit a redirect-handling failure.
Decode
Response body decoding failed.
Body
Request or response body-stream handling failed.
Builder
The request could not be built locally.
Request
The request failed at the HTTP request layer without a structured status.
Status
The server returned a non-success status code without a structured body.
Upgrade
HTTP 101 Switching Protocols upgrade (e.g., WebSocket); reserved
for future streaming response API. Not currently produced by any
in-tree transport implementation.
ResponseTooLarge
The response body exceeded the configured maximum size, so the
transport refused to buffer it. Produced by the SDK’s response-size
guard, not by reqwest classification.
Other
The transport failure does not match any of the named categories.
Implementations§
Trait Implementations§
Source§impl Clone for TransportErrorClass
impl Clone for TransportErrorClass
Source§fn clone(&self) -> TransportErrorClass
fn clone(&self) -> TransportErrorClass
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TransportErrorClass
Source§impl Debug for TransportErrorClass
impl Debug for TransportErrorClass
Source§impl Display for TransportErrorClass
impl Display for TransportErrorClass
impl Eq for TransportErrorClass
Source§impl Hash for TransportErrorClass
impl Hash for TransportErrorClass
Source§impl PartialEq for TransportErrorClass
impl PartialEq for TransportErrorClass
Source§fn eq(&self, other: &TransportErrorClass) -> bool
fn eq(&self, other: &TransportErrorClass) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TransportErrorClass
Auto Trait Implementations§
impl Freeze for TransportErrorClass
impl RefUnwindSafe for TransportErrorClass
impl Send for TransportErrorClass
impl Sync for TransportErrorClass
impl Unpin for TransportErrorClass
impl UnsafeUnpin for TransportErrorClass
impl UnwindSafe for TransportErrorClass
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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.