Skip to main content

RetryableError

Trait RetryableError 

Source
pub trait RetryableError<SP = NotSpecialized>:
    Error
    + MaybeSend
    + MaybeSync {
    // Required method
    fn is_retryable(&self) -> bool;

    // Provided method
    fn rate_limit_delay(&self) -> Option<Duration> { ... }
}
Expand description

Specifies which errors are retryable. All Errors are not retryable by-default.

Required Methods§

Provided Methods§

Source

fn rate_limit_delay(&self) -> Option<Duration>

The least time to wait before a retry, when the error says so. A rate-limit rejection carries one; [retry_async!] never retries sooner.

Implementations on Foreign Types§

Source§

impl RetryableError for Infallible

Source§

impl<E: RetryableError> RetryableError for Box<E>

Source§

impl<T> RetryableError for &T
where T: RetryableError,

Implementors§