pub struct ExponentialBackoffBuilder { /* private fields */ }
Expand description
Configures an ExponentialBackoff instance for use.
Implementations§
Source§impl ExponentialBackoffBuilder
impl ExponentialBackoffBuilder
Sourcepub const fn factor(self, factor: f64) -> Self
pub const fn factor(self, factor: f64) -> Self
Factor sets a backoff factor for the backoff algorithm.
Sourcepub const fn interval(self, interval: Duration) -> Self
pub const fn interval(self, interval: Duration) -> Self
Interval sets base wait interval for the backoff algorithm.
Sourcepub const fn jitter(self, jitter: Duration) -> Self
pub const fn jitter(self, jitter: Duration) -> Self
Jitter sets the maximum jitter for the backoff algorithm.
Sourcepub const fn max(self, max: Duration) -> Self
pub const fn max(self, max: Duration) -> Self
Max sets the maximum timeout despite the number of attempts. none/zero is the default.
Sourcepub const fn build(self) -> Exponential
pub const fn build(self) -> Exponential
finalizes the configuration and returns a usable Exponential instance.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExponentialBackoffBuilder
impl RefUnwindSafe for ExponentialBackoffBuilder
impl Send for ExponentialBackoffBuilder
impl Sync for ExponentialBackoffBuilder
impl Unpin for ExponentialBackoffBuilder
impl UnwindSafe for ExponentialBackoffBuilder
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