pub struct BreakerConfig {
pub failure_threshold: u32,
pub recovery_timeout: f64,
pub half_open_max_calls: u32,
pub success_threshold: u32,
}Expand description
Configuration for a CircuitBreaker.
Fields§
§failure_threshold: u32Consecutive failures that trip the breaker.
recovery_timeout: f64Seconds to stay Open before probing.
half_open_max_calls: u32Concurrent probe calls allowed while HalfOpen.
success_threshold: u32Probe successes needed to close again.
Implementations§
Trait Implementations§
Source§impl Clone for BreakerConfig
impl Clone for BreakerConfig
impl Copy for BreakerConfig
Source§impl Debug for BreakerConfig
impl Debug for BreakerConfig
Source§impl Default for BreakerConfig
impl Default for BreakerConfig
Source§impl PartialEq for BreakerConfig
impl PartialEq for BreakerConfig
impl StructuralPartialEq for BreakerConfig
Auto Trait Implementations§
impl Freeze for BreakerConfig
impl RefUnwindSafe for BreakerConfig
impl Send for BreakerConfig
impl Sync for BreakerConfig
impl Unpin for BreakerConfig
impl UnsafeUnpin for BreakerConfig
impl UnwindSafe for BreakerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more