Skip to main content

RetryErrorClassifier

Type Alias RetryErrorClassifier 

Source
pub type RetryErrorClassifier<E> = ArcBiFunction<E, RetryAttemptContext, RetryDecision>;
Expand description

Classifies an application error as retryable or non-retryable.

The classifier receives the original application error and the current attempt context. Returning RetryDecision::Retry allows the executor to continue if attempt and elapsed-time limits still permit another try; returning RetryDecision::Abort stops immediately with crate::RetryError::Aborted.

The classifier is stored as an ArcBiFunction so cloned crate::RetryExecutor instances can share it safely.

Aliased Typeยง

pub struct RetryErrorClassifier<E> { /* private fields */ }