pub struct BackoffStrategy { /* private fields */ }Available on crate feature
sleep only.Expand description
A polling strategy that applies exponential backoff to an inner interval strategy
Implementations§
Source§impl BackoffStrategy
impl BackoffStrategy
Sourcepub fn new(inner: IntervalStrategy, config: BackoffConfig) -> Self
pub fn new(inner: IntervalStrategy, config: BackoffConfig) -> Self
Create a new BackoffStrategy wrapping an IntervalStrategy with the given BackoffConfig
Trait Implementations§
Source§impl Clone for BackoffStrategy
impl Clone for BackoffStrategy
Source§fn clone(&self) -> BackoffStrategy
fn clone(&self) -> BackoffStrategy
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 BackoffStrategy
impl Debug for BackoffStrategy
Source§impl PollStrategy for BackoffStrategy
impl PollStrategy for BackoffStrategy
Auto Trait Implementations§
impl Freeze for BackoffStrategy
impl RefUnwindSafe for BackoffStrategy
impl Send for BackoffStrategy
impl Sync for BackoffStrategy
impl Unpin for BackoffStrategy
impl UnwindSafe for BackoffStrategy
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> PollStrategyExt for Twhere
T: PollStrategy,
impl<T> PollStrategyExt for Twhere
T: PollStrategy,
Source§fn build_stream(
self,
ctx: &PollContext,
) -> Pin<Box<dyn Stream<Item = ()> + Send>>where
Self::Stream: 'static,
fn build_stream(
self,
ctx: &PollContext,
) -> Pin<Box<dyn Stream<Item = ()> + Send>>where
Self::Stream: 'static,
Build a boxed stream from the strategy
This is a convenience method that boxes the strategy and calls
poll_strategy