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
sourceimpl<BACKOFF: Debug> Debug for ConsecutiveFailures<BACKOFF>
impl<BACKOFF: Debug> Debug for ConsecutiveFailures<BACKOFF>
sourceimpl Default for ConsecutiveFailures<EqualJittered>
impl Default for ConsecutiveFailures<EqualJittered>
sourceimpl<BACKOFF> FailurePolicy for ConsecutiveFailures<BACKOFF>where
BACKOFF: Iterator<Item = Duration> + Clone,
impl<BACKOFF> FailurePolicy for ConsecutiveFailures<BACKOFF>where
BACKOFF: Iterator<Item = Duration> + Clone,
sourcefn record_success(&mut self)
fn record_success(&mut self)
Invoked when a request is successful.
sourcefn 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
. Read moreAuto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more