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(default_delay: Duration, config: BackoffConfig) -> Self
pub fn new(default_delay: Duration, config: BackoffConfig) -> Self
Create a new BackoffStrategy with the given BackoffConfig
Trait Implementations§
Source§impl Clone for BackoffStrategy
impl Clone for BackoffStrategy
Source§impl Debug for BackoffStrategy
impl Debug for BackoffStrategy
Source§impl PollStrategy for BackoffStrategy
impl PollStrategy for BackoffStrategy
Source§fn poll_drive(
&mut self,
cx: &mut Context<'_>,
_: &PollSnapshot,
) -> Poll<Option<()>>
fn poll_drive( &mut self, cx: &mut Context<'_>, _: &PollSnapshot, ) -> Poll<Option<()>>
Poll to bind a waker to the next instance. Read more
Source§fn on_poll(&mut self, ctx: &PollSnapshot)
fn on_poll(&mut self, ctx: &PollSnapshot)
Signifies a poll was made
Auto Trait Implementations§
impl !RefUnwindSafe for BackoffStrategy
impl !UnwindSafe for BackoffStrategy
impl Freeze for BackoffStrategy
impl Send for BackoffStrategy
impl Sync for BackoffStrategy
impl Unpin for BackoffStrategy
impl UnsafeUnpin 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