#[non_exhaustive]
pub enum RetryKind {
    Error(ErrorKind),
    Explicit(Duration),
    UnretryableFailure,
    Unnecessary,
}
Expand description

RetryKind describes how a request MAY be retried for a given response

A RetryKind describes how a response MAY be retried; it does not mandate retry behavior. The actual retry behavior is at the sole discretion of the RetryStrategy in place. A RetryStrategy may ignore the suggestion for a number of reasons including but not limited to:

  • Number of retry attempts exceeded
  • The required retry delay exceeds the maximum backoff configured by the client
  • No retry tokens are available due to service health

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Error(ErrorKind)

Retry the associated request due to a known ErrorKind.

§

Explicit(Duration)

An Explicit retry (e.g. from x-amz-retry-after).

Note: The specified Duration is considered a suggestion and may be replaced or ignored.

§

UnretryableFailure

The response was a failure that should not be retried.

§

Unnecessary

The response was successful, so no retry is necessary.

Trait Implementations§

Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more