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

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

Required Methods§

source

fn classify_retry(&self, ctx: &InterceptorContext) -> Option<RetryReason>

Run this classifier against an error to determine if it should be retried. Returns Some(RetryKind) if the error should be retried; Otherwise returns None.

source

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

The name that this classifier should report for debugging purposes.

Implementors§