TransientError

Trait TransientError 

Source
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§

Source

fn is_transient(&self) -> bool

Returns true if this error is transient and may succeed on retry.

Provided Methods§

Source

fn is_permanent(&self) -> bool

Returns true if this error is permanent and should not be retried.

Source

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

Optional hint for how long to wait before retrying.

Source

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.

Implementors§