pub struct RetryPolicy { /* private fields */ }Expand description
Complete caller-owned retry budgets.
Implementations§
Source§impl RetryPolicy
impl RetryPolicy
Sourcepub const fn new(
max_attempts: MaxAttempts,
max_cumulative_delay: MonotonicDuration,
max_elapsed: MonotonicDuration,
) -> Self
pub const fn new( max_attempts: MaxAttempts, max_cumulative_delay: MonotonicDuration, max_elapsed: MonotonicDuration, ) -> Self
Creates complete hard attempt, requested-delay, and elapsed budgets.
Sourcepub const fn max_attempts(self) -> MaxAttempts
pub const fn max_attempts(self) -> MaxAttempts
Returns the total attempt bound.
Sourcepub const fn max_cumulative_delay(self) -> MonotonicDuration
pub const fn max_cumulative_delay(self) -> MonotonicDuration
Returns the cumulative caller-requested delay bound.
Sourcepub const fn max_elapsed(self) -> MonotonicDuration
pub const fn max_elapsed(self) -> MonotonicDuration
Returns the monotonic elapsed-time bound.
Trait Implementations§
Source§impl Clone for RetryPolicy
impl Clone for RetryPolicy
Source§fn clone(&self) -> RetryPolicy
fn clone(&self) -> RetryPolicy
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 moreimpl Copy for RetryPolicy
Source§impl Debug for RetryPolicy
impl Debug for RetryPolicy
impl Eq for RetryPolicy
Source§impl PartialEq for RetryPolicy
impl PartialEq for RetryPolicy
impl StructuralPartialEq for RetryPolicy
Auto Trait Implementations§
impl Freeze for RetryPolicy
impl RefUnwindSafe for RetryPolicy
impl Send for RetryPolicy
impl Sync for RetryPolicy
impl Unpin for RetryPolicy
impl UnsafeUnpin for RetryPolicy
impl UnwindSafe for RetryPolicy
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