#[non_exhaustive]pub enum ErrorClass {
Validation,
Transport,
Remote,
RateLimited,
Signing,
Cancelled,
Internal,
}Expand description
Coarse-grained failure classification, re-exported from cow-sdk-core.
Every public error type the facade aggregates exposes a matching
class() accessor, so the classification is consistent whether a caller
holds the facade CowError or a bare leaf error.
Coarse-grained failure classification shared across the workspace error
family.
Every public error type that the cow-sdk facade aggregates exposes a
class(&self) -> ErrorClass accessor that resolves to one of these
buckets, so downstream telemetry and retry layers can partition failures
without pattern-matching every nested variant by hand.
ErrorClass::Transport is the retryable class: the failure happened
before a complete response arrived, so resending is safe. For
ErrorClass::Remote the class alone is insufficient — a structured
4xx rejection is permanent while a 5xx outage is transient — so consult
the concrete error’s is_retryable() / backoff_hint() accessors
before retrying. The remaining classes signal caller-side or
protocol-level conditions that benefit from different recovery paths.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Validation
Caller-side input failed a client-side validation boundary.
Transport
A transport-layer failure occurred before a complete response was received.
Remote
The remote endpoint returned a structured error response.
RateLimited
The remote endpoint signalled rate limiting (HTTP 429) and the transport layer’s retry budget was exhausted before it cleared.
Transport retries already honor Retry-After, so reaching this class
means the throttle outlived the retry policy rather than a transient
spike the client absorbed.
Signing
A signing, provider, or cryptographic helper surfaced an error.
Cancelled
A long-running operation was cancelled through a cooperative token.
Internal
An internal invariant or helper contract was violated.
Implementations§
Source§impl ErrorClass
impl ErrorClass
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Returns the stable lowercase telemetry label for this class.
The label is a stability contract for telemetry partitioning, mirroring
TransportErrorClass::as_str and
the adapter class enums. Prefer it over {:?}, whose Debug output is
not contractual.
Trait Implementations§
Source§impl Clone for ErrorClass
impl Clone for ErrorClass
Source§fn clone(&self) -> ErrorClass
fn clone(&self) -> ErrorClass
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 ErrorClass
Source§impl Debug for ErrorClass
impl Debug for ErrorClass
Source§impl Display for ErrorClass
impl Display for ErrorClass
impl Eq for ErrorClass
Source§impl Hash for ErrorClass
impl Hash for ErrorClass
Source§impl PartialEq for ErrorClass
impl PartialEq for ErrorClass
Source§fn eq(&self, other: &ErrorClass) -> bool
fn eq(&self, other: &ErrorClass) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ErrorClass
Auto Trait Implementations§
impl Freeze for ErrorClass
impl RefUnwindSafe for ErrorClass
impl Send for ErrorClass
impl Sync for ErrorClass
impl Unpin for ErrorClass
impl UnsafeUnpin for ErrorClass
impl UnwindSafe for ErrorClass
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.