RetryableError

Trait RetryableError 

Source
pub trait RetryableError {
    // Required method
    fn is_retryable(&self) -> bool;

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

Determines if an error should be retried

Required Methods§

Source

fn is_retryable(&self) -> bool

Returns true if the error is transient and the operation should be retried

Provided Methods§

Source

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

Returns the retry-after duration if specified by the error

Implementors§

Source§

impl<E> RetryableError for ApiError<E>
where E: Error,