pub enum BreakerState {
Closed,
Open,
HalfOpen,
}Expand description
The circuit breaker’s state-machine position.
CLOSED --(N consecutive failures)--> OPEN --(recovery_timeout)--> HALF_OPEN
^ ^ |
| +------ any probe fails -------+
+------------ enough probes succeed ---------------------------------+Variants§
Closed
Calls flow normally.
Open
Calls are rejected to protect a failing backend.
HalfOpen
A limited number of probe calls are allowed to test recovery.
Implementations§
Trait Implementations§
Source§impl Clone for BreakerState
impl Clone for BreakerState
impl Copy for BreakerState
Source§impl Debug for BreakerState
impl Debug for BreakerState
Source§impl Display for BreakerState
impl Display for BreakerState
impl Eq for BreakerState
Source§impl Hash for BreakerState
impl Hash 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