do-over 0.1.0

Async resilience policies for Rust inspired by Polly
Documentation
//! # do-over
//!
//! An async-first resilience and transient fault handling library for Rust,
//! inspired by the .NET Polly library.
//!
//! ## Overview
//!
//! `do-over` provides a set of resilience policies that can be used to make your
//! applications more robust when dealing with transient failures, network issues,
//! and other common problems in distributed systems.
//!
//! ## Policies
//!
//! - [`retry::RetryPolicy`] - Retry failed operations with configurable backoff
//! - [`circuit_breaker::CircuitBreaker`] - Prevent cascading failures
//! - [`timeout::TimeoutPolicy`] - Time-bound operations
//! - [`bulkhead::Bulkhead`] - Limit concurrent executions
//! - [`rate_limit::RateLimiter`] - Token bucket rate limiting
//! - [`hedge::Hedge`] - Hedged requests for latency reduction
//! - [`fallback::FallbackExt`] - Return default values on failure
//! - [`cache::TypedCache`] - Cache successful results
//! - [`wrap::Wrap`] - Compose multiple policies together
//!
//! ## Utilities
//!
//! - [`context::Context`] - Pass metadata through policy execution
//!
//! ## Quick Start
//!
//! ```rust
//! use do_over::{policy::Policy, retry::RetryPolicy, timeout::TimeoutPolicy, wrap::Wrap, error::DoOverError};
//! use std::time::Duration;
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! // Create a policy that retries 3 times with a 5s timeout per attempt
//! let policy = Wrap::new(
//!     RetryPolicy::fixed(3, Duration::from_millis(100)),
//!     TimeoutPolicy::new(Duration::from_secs(5)),
//! );
//!
//! // Execute your operation with resilience
//! let result: Result<&str, DoOverError<&str>> = policy.execute(|| async {
//!     Ok("success")
//! }).await;
//! # Ok(())
//! # }
//! ```
//!
//! ## Policy Composition
//!
//! Policies can be composed using [`wrap::Wrap`]. The recommended ordering
//! (from outer to inner) is:
//!
//! 1. Bulkhead - Limit concurrency first
//! 2. Circuit Breaker - Fast-fail if too many errors
//! 3. Rate Limiter - Throttle requests
//! 4. Retry - Handle transient failures
//! 5. Timeout - Bound individual attempts
//!
//! ## Feature Flags
//!
//! - `http` - Enables reqwest integration
//! - `metrics-prometheus` - Prometheus metrics
//! - `metrics-otel` - OpenTelemetry metrics

pub mod error;
pub mod policy;
pub mod retry;
pub mod circuit_breaker;
pub mod timeout;
pub mod bulkhead;
pub mod rate_limit;
pub mod hedge;
pub mod fallback;
pub mod cache;
pub mod context;
pub mod wrap;
pub mod tower;

#[cfg(feature = "http")]
pub mod http;

pub mod metrics;