//! Policy trait — the core abstraction that all resilience strategies implement.
//!
//! A Policy wraps an async operation and adds cross-cutting behavior such as
//! retrying on failure, enforcing timeouts, or breaking the circuit.
use Future;
/// Defines the interface for a resilience policy.
///
/// # Type Parameters
/// - `T`: The success type of the wrapped operation.
/// - `E`: The error type of the wrapped operation.
///
/// Implementors provide custom logic that runs before, after, or around
/// the operation (e.g., retrying on failure, measuring latency, etc.).