pub enum BreakerMode {
Count {
failures: NonZeroU64,
},
Rate {
window: DurationMs,
failure_rate: f64,
min_calls: NonZeroU32,
},
}Expand description
The breaker mode a BreakerPolicy resolves to, with every default
applied — the engine/stubs consume this, never the raw knobs.
Variants§
Count
failures consecutive terminal failures open the breaker.
Fields
§
failures: NonZeroU64Rate
Failure-rate tripping over a sliding window of post-retry outcomes.
Trait Implementations§
Source§impl Clone for BreakerMode
impl Clone for BreakerMode
Source§fn clone(&self) -> BreakerMode
fn clone(&self) -> BreakerMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BreakerMode
Source§impl Debug for BreakerMode
impl Debug for BreakerMode
Source§impl PartialEq for BreakerMode
impl PartialEq for BreakerMode
impl StructuralPartialEq for BreakerMode
Auto Trait Implementations§
impl Freeze for BreakerMode
impl RefUnwindSafe for BreakerMode
impl Send for BreakerMode
impl Sync for BreakerMode
impl Unpin for BreakerMode
impl UnsafeUnpin for BreakerMode
impl UnwindSafe for BreakerMode
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