pub trait Retryable {
// Required method
fn is_transient(&self) -> bool;
}Expand description
Marker trait for errors that can be classified as transient — eligible for
automatic retry — versus structural, where retrying is wasted work. This is
the general classifier used by WithRetry; HTTP status classification
(retry_on, Retry-After) is a separate concern that lives on the call.
Required Methods§
Sourcefn is_transient(&self) -> bool
fn is_transient(&self) -> bool
true if the failure is expected to resolve on a fresh attempt
(network drop, timeout, 5xx, 429); false if structural (4xx, decode).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".