pub struct FixedDelay {
pub delay: Duration,
pub max_retries: u32,
}Expand description
Fixed delay between retries.
Fields§
§delay: DurationDelay between retries.
max_retries: u32Maximum retries.
Implementations§
Source§impl FixedDelay
impl FixedDelay
Sourcepub fn new(delay: Duration, max_retries: u32) -> FixedDelay
pub fn new(delay: Duration, max_retries: u32) -> FixedDelay
Create a new fixed delay strategy.
Trait Implementations§
Source§impl Clone for FixedDelay
impl Clone for FixedDelay
Source§fn clone(&self) -> FixedDelay
fn clone(&self) -> FixedDelay
Returns a duplicate of the value. Read more
1.0.0 · 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 FixedDelay
impl Debug for FixedDelay
Source§impl RetryStrategy for FixedDelay
impl RetryStrategy for FixedDelay
Source§fn should_retry(&self, error: &RetryableError, attempt: u32) -> Option<Duration>
fn should_retry(&self, error: &RetryableError, attempt: u32) -> Option<Duration>
Determine if and how long to wait before retrying. Read more
Source§fn max_retries(&self) -> u32
fn max_retries(&self) -> u32
Get the maximum number of retries.
Source§fn is_exhausted(&self, attempt: u32) -> bool
fn is_exhausted(&self, attempt: u32) -> bool
Check if retries are exhausted.
Auto Trait Implementations§
impl Freeze for FixedDelay
impl RefUnwindSafe for FixedDelay
impl Send for FixedDelay
impl Sync for FixedDelay
impl Unpin for FixedDelay
impl UnwindSafe for FixedDelay
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