pub struct EaseOffCore { /* private fields */ }Expand description
Immutable core backoff API, without error management or sleeps.
Implementations§
Source§impl EaseOffCore
impl EaseOffCore
Sourcepub const fn new(options: Options) -> Self
pub const fn new(options: Options) -> Self
Create an instance from a built Options.
May be more conveniently invoked as Options::into_core().
Sourcepub fn nth_retry_at(
&self,
n: u32,
now: Instant,
deadline: Option<Instant>,
rng: &mut (impl Rng + ?Sized),
) -> Result<Option<Instant>, RetryAfterDeadline>
pub fn nth_retry_at( &self, n: u32, now: Instant, deadline: Option<Instant>, rng: &mut (impl Rng + ?Sized), ) -> Result<Option<Instant>, RetryAfterDeadline>
Returns the recommended Instant at which to schedule the nth backoff attempt.
Returns Ok(None) if n == 0 and Options::initial_jitter is not greater than zero.
Returns Err if the calculated Instant falls after deadline.
Trait Implementations§
Source§impl Clone for EaseOffCore
impl Clone for EaseOffCore
Source§fn clone(&self) -> EaseOffCore
fn clone(&self) -> EaseOffCore
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 moreAuto Trait Implementations§
impl Freeze for EaseOffCore
impl RefUnwindSafe for EaseOffCore
impl Send for EaseOffCore
impl Sync for EaseOffCore
impl Unpin for EaseOffCore
impl UnsafeUnpin for EaseOffCore
impl UnwindSafe for EaseOffCore
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