pub trait TransientError {
// Required method
fn is_transient(&self) -> bool;
// Provided methods
fn is_permanent(&self) -> bool { ... }
fn retry_after_hint(&self) -> Option<Duration> { ... }
fn max_retries_hint(&self) -> Option<u32> { ... }
}Expand description
Classification of errors as transient or permanent.
Required Methods§
Sourcefn is_transient(&self) -> bool
fn is_transient(&self) -> bool
Returns true if this error is transient and may succeed on retry.
Provided Methods§
Sourcefn is_permanent(&self) -> bool
fn is_permanent(&self) -> bool
Returns true if this error is permanent and should not be retried.
Sourcefn retry_after_hint(&self) -> Option<Duration>
fn retry_after_hint(&self) -> Option<Duration>
Optional hint for how long to wait before retrying.
Sourcefn max_retries_hint(&self) -> Option<u32>
fn max_retries_hint(&self) -> Option<u32>
Returns the maximum number of retry attempts for this error.
Implementations on Foreign Types§
Source§impl TransientError for Error
Available on crate feature std only.
impl TransientError for Error
Available on crate feature
std only.