1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Error recovery patterns for handling transient errors
//!
//! This module provides various error recovery strategies that can be used to make
//! applications more resilient to transient failures.
//!
//! # Features
//!
//! - Backoff strategies for controlling retry timing
//! - Circuit breaker pattern to prevent cascading failures
//! - Retry policies for flexible retry behaviors
//! - `ForgeError`-aware retry executors for sync workloads
//!
//! # Examples
//!
//! ```
//! use error_forge::recovery::RetryPolicy;
//!
//! let policy = RetryPolicy::new_exponential().with_max_retries(3);
//!
//! // The operation must declare its error type so the policy can
//! // type-check the retry loop. Here we use `std::io::Error`.
//! let result: Result<(), std::io::Error> = policy.retry(|| Ok(()));
//! assert!(result.is_ok());
//! ```
pub use ;
pub use ;
pub use ForgeErrorRecovery;
pub use ;
/// Result type for recovery operations
pub type RecoveryResult<T> =
Result;