atomic-circuit-breaker 11.2.0

Zero-dependency, lock-free atomic sliding-window circuit breaker with CAS probe gating, monotonic clock support, and RAII guards.
Documentation
/// Display message when a duration exceeds `u64::MAX` nanoseconds.
pub(crate) const ERR_DURATION_OVERFLOW: &str = "duration exceeds u64::MAX nanoseconds";

/// Display message when cooldown duration is zero.
pub(crate) const ERR_ZERO_COOLDOWN: &str = "cooldown duration must be greater than zero";

/// Display message when sliding window duration is zero.
pub(crate) const ERR_ZERO_WINDOW: &str = "sliding window duration must be greater than zero";

/// Display message when no tripping condition is enabled.
pub(crate) const ERR_NO_TRIP_CONDITION: &str =
    "at least one failure threshold or failure rate must be configured";

/// Display message when a configured failure threshold is zero.
pub(crate) const ERR_INVALID_THRESHOLD: &str = "failure threshold must be greater than zero";

/// Display message when a configured failure rate is outside `(0.0, 1.0]`.
pub(crate) const ERR_INVALID_FAILURE_RATE: &str =
    "failure rate must be finite and within (0.0, 1.0] (1..=10_000 bps)";

/// Display message when half-open probe settings are invalid.
pub(crate) const ERR_INVALID_HALF_OPEN: &str =
    "half-open probe limits must satisfy 1 <= success_threshold <= max_probes";

/// Display message when a call is rejected by an open or probe-saturated circuit.
pub(crate) const ERR_CALL_REJECTED: &str = "call rejected by circuit breaker";