pub enum BreakerState {
Closed = 0,
Open = 1,
HalfOpen = 2,
}Expand description
Three-state circuit breaker (RFC 0018 §4.2). Stored as a u8 in the health
record so the whole record is lock-free.
Variants§
Closed = 0
Normal — in rotation.
Open = 1
Removed from rotation for a cooldown after N consecutive failures.
HalfOpen = 2
Eligible for exactly one probe; success re-closes, failure re-opens.
Implementations§
Trait Implementations§
Source§impl Clone for BreakerState
impl Clone for BreakerState
Source§fn clone(&self) -> BreakerState
fn clone(&self) -> BreakerState
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 BreakerState
Source§impl Debug for BreakerState
impl Debug for BreakerState
impl Eq for BreakerState
Source§impl PartialEq for BreakerState
impl PartialEq for BreakerState
impl StructuralPartialEq for BreakerState
Auto Trait Implementations§
impl Freeze for BreakerState
impl RefUnwindSafe for BreakerState
impl Send for BreakerState
impl Sync for BreakerState
impl Unpin for BreakerState
impl UnsafeUnpin for BreakerState
impl UnwindSafe for BreakerState
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