pub trait ErrorClassifiable {
// Required methods
fn is_retryable(&self) -> bool;
fn requires_user_intervention(&self) -> bool;
// Provided methods
fn retry_after_ms(&self) -> Option<u64> { ... }
fn max_retries(&self) -> u32 { ... }
}Expand description
Unified error classification for retry/intervention decisions across all error types.
Generalizes ErrorKind::is_retriable() and adds requires_user_intervention()
for errors that need a human to resolve (e.g., expired auth, disk full, quota hit).
Required Methods§
Sourcefn is_retryable(&self) -> bool
fn is_retryable(&self) -> bool
Whether this error can be retried automatically.
Sourcefn requires_user_intervention(&self) -> bool
fn requires_user_intervention(&self) -> bool
Whether this error requires a human to intervene.
Provided Methods§
Sourcefn retry_after_ms(&self) -> Option<u64>
fn retry_after_ms(&self) -> Option<u64>
Suggested retry delay in milliseconds (None = use default backoff).
Sourcefn max_retries(&self) -> u32
fn max_retries(&self) -> u32
Maximum number of retries before giving up.