pub struct RetryConfigBuilder { /* private fields */ }Expand description
Builder for RetryConfig.
Implementations§
Source§impl RetryConfigBuilder
impl RetryConfigBuilder
Sourcepub fn max_attempts(self, n: u32) -> Self
pub fn max_attempts(self, n: u32) -> Self
Sets the maximum number of attempts.
Sourcepub fn initial_delay(self, delay: Duration) -> Self
pub fn initial_delay(self, delay: Duration) -> Self
Sets the initial delay before the first retry.
Sourcepub fn multiplier(self, m: f64) -> Self
pub fn multiplier(self, m: f64) -> Self
Sets the multiplier for exponential backoff.
Sourcepub fn build(self) -> RetryConfig
pub fn build(self) -> RetryConfig
Builds the RetryConfig.
Trait Implementations§
Source§impl Debug for RetryConfigBuilder
impl Debug for RetryConfigBuilder
Source§impl Default for RetryConfigBuilder
impl Default for RetryConfigBuilder
Source§fn default() -> RetryConfigBuilder
fn default() -> RetryConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RetryConfigBuilder
impl RefUnwindSafe for RetryConfigBuilder
impl Send for RetryConfigBuilder
impl Sync for RetryConfigBuilder
impl Unpin for RetryConfigBuilder
impl UnsafeUnpin for RetryConfigBuilder
impl UnwindSafe for RetryConfigBuilder
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