pub struct NeverRetry;Expand description
A retry policy that never retries.
This policy is useful when the client already has (or may already have) a retry policy configured, and you want to avoid retrying a particular method.
§Example
fn customize_retry_policy(builder: impl RequestOptionsBuilder) -> impl RequestOptionsBuilder {
builder.with_retry_policy(NeverRetry)
}Trait Implementations§
Source§impl Clone for NeverRetry
impl Clone for NeverRetry
Source§fn clone(&self) -> NeverRetry
fn clone(&self) -> NeverRetry
Returns a copy 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 NeverRetry
impl Debug for NeverRetry
Source§impl RetryPolicy for NeverRetry
impl RetryPolicy for NeverRetry
Source§fn on_error(
&self,
_loop_start: Instant,
_attempt_count: u32,
_idempotent: bool,
error: Error,
) -> LoopState
fn on_error( &self, _loop_start: Instant, _attempt_count: u32, _idempotent: bool, error: Error, ) -> LoopState
Query the retry policy after an error. Read more
Auto Trait Implementations§
impl Freeze for NeverRetry
impl RefUnwindSafe for NeverRetry
impl Send for NeverRetry
impl Sync for NeverRetry
impl Unpin for NeverRetry
impl UnwindSafe for NeverRetry
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> RetryPolicyExt for Twhere
T: RetryPolicy,
impl<T> RetryPolicyExt for Twhere
T: RetryPolicy,
Source§fn with_time_limit(self, maximum_duration: Duration) -> LimitedElapsedTime<Self>
fn with_time_limit(self, maximum_duration: Duration) -> LimitedElapsedTime<Self>
Decorate a
RetryPolicy to limit the total elapsed time in the retry loop. Read moreSource§fn with_attempt_limit(self, maximum_attempts: u32) -> LimitedAttemptCount<Self>
fn with_attempt_limit(self, maximum_attempts: u32) -> LimitedAttemptCount<Self>
Decorate a RetryPolicy to limit the number of retry attempts. Read more