#[non_exhaustive]pub struct RetryInfo {
pub retry_delay: Option<Duration>,
/* private fields */
}Expand description
Describes when the clients can retry a failed request. Clients could ignore the recommendation here or retry when this information is missing from error responses.
It’s always recommended that clients should use exponential backoff when retrying.
Clients should wait until retry_delay amount of time has passed since
receiving the error response before retrying. If retrying requests also
fail, clients should use an exponential backoff scheme to gradually increase
the delay between retries based on retry_delay, until either a maximum
number of retries have been reached or a maximum retry delay cap has been
reached.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.retry_delay: Option<Duration>Clients should wait at least this long between retrying the same request.
Implementations§
Source§impl RetryInfo
impl RetryInfo
pub fn new() -> Self
Sourcepub fn set_retry_delay<T>(self, v: T) -> Self
pub fn set_retry_delay<T>(self, v: T) -> Self
Sets the value of retry_delay.
Sourcepub fn set_or_clear_retry_delay<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_retry_delay<T>(self, v: Option<T>) -> Self
Sets or clears the value of retry_delay.