pub struct BackoffState { /* private fields */ }Expand description
Tracks the evolving backoff state across attempts.
Implementations§
Source§impl BackoffState
impl BackoffState
pub fn new(config: BackoffConfig) -> Self
pub fn attempts(&self) -> usize
pub fn has_time_remaining(&self) -> bool
pub fn can_retry(&self) -> bool
pub fn next_delay(&mut self) -> Duration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BackoffState
impl RefUnwindSafe for BackoffState
impl Send for BackoffState
impl Sync for BackoffState
impl Unpin for BackoffState
impl UnwindSafe for BackoffState
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