pub trait ClassifyRetry: Send + Sync + Debug {
    // Required methods
    fn classify_retry(&self, ctx: &InterceptorContext) -> RetryAction;
    fn name(&self) -> &'static str;

    // Provided method
    fn priority(&self) -> RetryClassifierPriority { ... }
}
Available on crate feature client only.
Expand description

Classifies what kind of retry is needed for a given InterceptorContext.

Required Methods§

source

fn classify_retry(&self, ctx: &InterceptorContext) -> RetryAction

Run this classifier on the InterceptorContext to determine if the previous request should be retried. Returns a RetryAction.

source

fn name(&self) -> &'static str

The name of this retry classifier.

Used for debugging purposes.

Provided Methods§

source

fn priority(&self) -> RetryClassifierPriority

The priority of this retry classifier. Classifiers with a higher priority will override the results of classifiers with a lower priority. Classifiers with equal priorities make no guarantees about which will override the other.

Implementors§

source§

impl ClassifyRetry for AlwaysRetry

Available on crate feature test-util only.
source§

impl ClassifyRetry for SharedRetryClassifier