pub struct RetryConfigBuilder<P: RetryPolicy, B: BackoffStrategy> { /* private fields */ }Expand description
Builder for RetryConfig.
Implementations§
Source§impl<P: RetryPolicy, B: BackoffStrategy> RetryConfigBuilder<P, B>
impl<P: RetryPolicy, B: BackoffStrategy> RetryConfigBuilder<P, B>
Sourcepub fn max_retries(self, max: u32) -> Self
pub fn max_retries(self, max: u32) -> Self
Set maximum retry attempts.
Sourcepub fn policy<P2: RetryPolicy>(self, policy: P2) -> RetryConfigBuilder<P2, B>
pub fn policy<P2: RetryPolicy>(self, policy: P2) -> RetryConfigBuilder<P2, B>
Set the retry policy.
Sourcepub fn backoff<B2: BackoffStrategy>(
self,
backoff: B2,
) -> RetryConfigBuilder<P, B2>
pub fn backoff<B2: BackoffStrategy>( self, backoff: B2, ) -> RetryConfigBuilder<P, B2>
Set the backoff strategy.
Sourcepub fn total_timeout(self, timeout: Duration) -> Self
pub fn total_timeout(self, timeout: Duration) -> Self
Set the total timeout for all retries.
Sourcepub fn no_total_timeout(self) -> Self
pub fn no_total_timeout(self) -> Self
Disable total timeout.
Sourcepub fn build(self) -> RetryConfig<P, B>
pub fn build(self) -> RetryConfig<P, B>
Build the configuration.
Trait Implementations§
Source§impl<P: Clone + RetryPolicy, B: Clone + BackoffStrategy> Clone for RetryConfigBuilder<P, B>
impl<P: Clone + RetryPolicy, B: Clone + BackoffStrategy> Clone for RetryConfigBuilder<P, B>
Source§fn clone(&self) -> RetryConfigBuilder<P, B>
fn clone(&self) -> RetryConfigBuilder<P, B>
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<P: Debug + RetryPolicy, B: Debug + BackoffStrategy> Debug for RetryConfigBuilder<P, B>
impl<P: Debug + RetryPolicy, B: Debug + BackoffStrategy> Debug for RetryConfigBuilder<P, B>
Auto Trait Implementations§
impl<P, B> Freeze for RetryConfigBuilder<P, B>
impl<P, B> RefUnwindSafe for RetryConfigBuilder<P, B>where
P: RefUnwindSafe,
B: RefUnwindSafe,
impl<P, B> Send for RetryConfigBuilder<P, B>
impl<P, B> Sync for RetryConfigBuilder<P, B>
impl<P, B> Unpin for RetryConfigBuilder<P, B>
impl<P, B> UnwindSafe for RetryConfigBuilder<P, B>where
P: UnwindSafe,
B: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request