pub struct RetryConfigBuilder { /* private fields */ }Expand description
Builder for retry configuration
Implementations§
Source§impl RetryConfigBuilder
impl RetryConfigBuilder
Sourcepub fn max_retries(self, max_retries: u32) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
Set maximum number of retries
Sourcepub fn initial_delay(self, delay: Duration) -> Self
pub fn initial_delay(self, delay: Duration) -> Self
Set initial delay
Sourcepub fn multiplier(self, multiplier: f64) -> Self
pub fn multiplier(self, multiplier: f64) -> Self
Set backoff multiplier
Sourcepub fn use_jitter(self, use_jitter: bool) -> Self
pub fn use_jitter(self, use_jitter: bool) -> Self
Enable or disable jitter
Sourcepub fn jitter_factor(self, factor: f64) -> Self
pub fn jitter_factor(self, factor: f64) -> Self
Set jitter factor
Sourcepub fn build(self) -> RetryConfig
pub fn build(self) -> RetryConfig
Build the 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 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more