pub struct MetricCircuitBreaker { /* private fields */ }
Expand description
Circuit breaker for metric recording
Implementations§
Source§impl MetricCircuitBreaker
impl MetricCircuitBreaker
Sourcepub fn is_allowed(&self) -> bool
pub fn is_allowed(&self) -> bool
Check if operation is allowed
Sourcepub fn record_success(&self)
pub fn record_success(&self)
Record success
Sourcepub fn record_failure(&self)
pub fn record_failure(&self)
Record failure
Auto Trait Implementations§
impl !Freeze for MetricCircuitBreaker
impl !RefUnwindSafe for MetricCircuitBreaker
impl Send for MetricCircuitBreaker
impl Sync for MetricCircuitBreaker
impl Unpin for MetricCircuitBreaker
impl UnwindSafe for MetricCircuitBreaker
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