Struct failsafe::failure_policy::ConsecutiveFailures
source · pub struct ConsecutiveFailures<BACKOFF> { /* private fields */ }
Expand description
A policy based on a maximum number of consecutive failure
Trait Implementations§
source§impl<BACKOFF: Debug> Debug for ConsecutiveFailures<BACKOFF>
impl<BACKOFF: Debug> Debug for ConsecutiveFailures<BACKOFF>
source§impl Default for ConsecutiveFailures<EqualJittered>
impl Default for ConsecutiveFailures<EqualJittered>
source§impl<BACKOFF> FailurePolicy for ConsecutiveFailures<BACKOFF>
impl<BACKOFF> FailurePolicy for ConsecutiveFailures<BACKOFF>
source§fn record_success(&mut self)
fn record_success(&mut self)
Invoked when a request is successful.
source§fn mark_dead_on_failure(&mut self) -> Option<Duration>
fn mark_dead_on_failure(&mut self) -> Option<Duration>
Invoked when a non-probing request fails. If it returns
Some(Duration)
,
the backend will mark as the dead for the specified Duration
.Auto Trait Implementations§
impl<BACKOFF> Freeze for ConsecutiveFailures<BACKOFF>where
BACKOFF: Freeze,
impl<BACKOFF> RefUnwindSafe for ConsecutiveFailures<BACKOFF>where
BACKOFF: RefUnwindSafe,
impl<BACKOFF> Send for ConsecutiveFailures<BACKOFF>where
BACKOFF: Send,
impl<BACKOFF> Sync for ConsecutiveFailures<BACKOFF>where
BACKOFF: Sync,
impl<BACKOFF> Unpin for ConsecutiveFailures<BACKOFF>where
BACKOFF: Unpin,
impl<BACKOFF> UnwindSafe for ConsecutiveFailures<BACKOFF>where
BACKOFF: UnwindSafe,
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