qubit-retry 0.3.1

Retry module, providing a feature-complete, type-safe retry management system with support for multiple delay strategies and event listeners
Documentation
/*******************************************************************************
 *
 *    Copyright (c) 2025 - 2026.
 *    Haixing Hu, Qubit Co. Ltd.
 *
 *    All rights reserved.
 *
 ******************************************************************************/

use crate::events::{AttemptContext, RetryDecision};
use qubit_function::ArcBiFunction;

/// 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.
pub type ErrorClassifier<E> = ArcBiFunction<E, AttemptContext, RetryDecision>;