Skip to main content

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 RetryableError for Error

Implement RetryableError for the main Error type.

Source§

impl RetryableError for RpcError

Implement RetryableError for RpcError to determine which errors should be retried.

Source§

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