pub struct RetryConfigBuilder { /* private fields */ }Expand description
Builder for creating customized retry configuration instances
This builder allows you to configure various aspects of retry behavior such as retry mode, maximum attempts, delays, and backoff multipliers.
Implementations§
Source§impl RetryConfigBuilder
impl RetryConfigBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new retry configuration builder with sensible defaults
§Returns
A new RetryConfigBuilder instance with default retry settings
Sourcepub fn max_attempts(self, max_attempts: u32) -> Self
pub fn max_attempts(self, max_attempts: u32) -> Self
Sourcepub fn initial_delay(self, delay: Duration) -> Self
pub fn initial_delay(self, delay: Duration) -> Self
Sourcepub fn backoff_multiplier(self, multiplier: f64) -> Self
pub fn backoff_multiplier(self, multiplier: f64) -> Self
Sourcepub fn build(self) -> RetryConfig
pub fn build(self) -> RetryConfig
Builds the final retry configuration instance
§Returns
A new RetryConfig instance with the specified settings
Trait Implementations§
Source§impl Clone for RetryConfigBuilder
impl Clone for RetryConfigBuilder
Source§fn clone(&self) -> RetryConfigBuilder
fn clone(&self) -> RetryConfigBuilder
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 RetryConfigBuilder
impl Debug for RetryConfigBuilder
Auto Trait Implementations§
impl Freeze for RetryConfigBuilder
impl RefUnwindSafe for RetryConfigBuilder
impl Send for RetryConfigBuilder
impl Sync for RetryConfigBuilder
impl Unpin 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