#[non_exhaustive]pub enum BreakerState {
Closed,
Open,
HalfOpen,
}Available on crate feature
circuit-breaker only.Expand description
The breaker’s current state, as a snapshot.
#[non_exhaustive]: matching should include a wildcard.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Closed
Requests flow to the wrapped limiter; failures are being counted.
Open
Requests are shed immediately; the downstream is being given time.
HalfOpen
A few trial requests are allowed to test whether the downstream recovered.
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
Source§fn eq(&self, other: &BreakerState) -> bool
fn eq(&self, other: &BreakerState) -> bool
Tests for
self and other values to be equal, and is used by ==.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