pub enum BackoffAction {
Retry(Duration),
CircuitOpen {
failures: u32,
max_retries: u32,
},
}Expand description
Result of computing the next backoff delay.
Variants§
Retry(Duration)
Wait for the given duration and then retry.
CircuitOpen
The circuit breaker has tripped — too many failures within the configured window. The supervisor should escalate (alert, shut down, etc.) rather than retry.
Trait Implementations§
Source§impl Clone for BackoffAction
impl Clone for BackoffAction
Source§fn clone(&self) -> BackoffAction
fn clone(&self) -> BackoffAction
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 moreSource§impl Debug for BackoffAction
impl Debug for BackoffAction
Source§impl PartialEq for BackoffAction
impl PartialEq for BackoffAction
Source§fn eq(&self, other: &BackoffAction) -> bool
fn eq(&self, other: &BackoffAction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for BackoffAction
impl StructuralPartialEq for BackoffAction
Auto Trait Implementations§
impl Freeze for BackoffAction
impl RefUnwindSafe for BackoffAction
impl Send for BackoffAction
impl Sync for BackoffAction
impl Unpin for BackoffAction
impl UnsafeUnpin for BackoffAction
impl UnwindSafe for BackoffAction
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