pub struct RetryConfigBuilder { /* private fields */ }Expand description
Builder for creating RetryConfig instances.
Implementations§
Source§impl RetryConfigBuilder
impl RetryConfigBuilder
Sourcepub fn max_attempts(self, max_attempts: u32) -> Self
pub fn max_attempts(self, max_attempts: u32) -> Self
Set the maximum number of attempts.
Sourcepub fn initial_backoff(self, initial_backoff: Duration) -> Self
pub fn initial_backoff(self, initial_backoff: Duration) -> Self
Set the initial backoff duration.
Sourcepub fn max_backoff(self, max_backoff: Duration) -> Self
pub fn max_backoff(self, max_backoff: Duration) -> Self
Set the maximum backoff duration.
Sourcepub fn multiplier(self, multiplier: f64) -> Self
pub fn multiplier(self, multiplier: f64) -> Self
Set the backoff multiplier.
Sourcepub fn retry_on_rate_limit(self, retry: bool) -> Self
pub fn retry_on_rate_limit(self, retry: bool) -> Self
Set whether to retry on rate limit errors.
Sourcepub fn retry_on_transport(self, retry: bool) -> Self
pub fn retry_on_transport(self, retry: bool) -> Self
Set whether to retry on transport errors.
Sourcepub fn retry_on_timeout(self, retry: bool) -> Self
pub fn retry_on_timeout(self, retry: bool) -> Self
Set whether to retry on timeout errors.
Sourcepub fn build(self) -> RetryConfig
pub fn build(self) -> RetryConfig
Build the retry configuration.
Trait Implementations§
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