pub struct DefaultBackoff;Expand description
Default exponential backoff strategy with a maximum delay cap.
Uses 2^n + 10ms formula, capped at 2^15ms.
Trait Implementations§
Source§impl Clone for DefaultBackoff
impl Clone for DefaultBackoff
Source§fn clone(&self) -> DefaultBackoff
fn clone(&self) -> DefaultBackoff
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 DefaultBackoff
impl Debug for DefaultBackoff
Source§impl PartialEq for DefaultBackoff
impl PartialEq for DefaultBackoff
Source§impl ReconnectBackoff for DefaultBackoff
impl ReconnectBackoff for DefaultBackoff
Source§fn reconnect_backoff(&mut self, reconnection_attempt: u32) -> Duration
fn reconnect_backoff(&mut self, reconnection_attempt: u32) -> Duration
Returns the backoff duration to wait before the next reconnection attempt.
impl Copy for DefaultBackoff
impl StructuralPartialEq for DefaultBackoff
Auto Trait Implementations§
impl Freeze for DefaultBackoff
impl RefUnwindSafe for DefaultBackoff
impl Send for DefaultBackoff
impl Sync for DefaultBackoff
impl Unpin for DefaultBackoff
impl UnsafeUnpin for DefaultBackoff
impl UnwindSafe for DefaultBackoff
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more