Enum aws_sdk_kms::config::retry::RetryAction
source · #[non_exhaustive]pub enum RetryAction {
NoActionIndicated,
RetryIndicated(RetryReason),
RetryForbidden,
}
Expand description
The result of running a ClassifyRetry
on a InterceptorContext
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoActionIndicated
When a classifier can’t run or has no opinion, this action is returned.
For example, if a classifier requires a parsed response and response parsing failed, this action is returned. If all classifiers return this action, no retry should be attempted.
RetryIndicated(RetryReason)
When a classifier runs and thinks a response should be retried, this action is returned.
RetryForbidden
When a classifier runs and decides a response must not be retried, this action is returned.
This action stops retry classification immediately, skipping any following classifiers.
Implementations§
source§impl RetryAction
impl RetryAction
sourcepub fn retryable_error(kind: ErrorKind) -> RetryAction
pub fn retryable_error(kind: ErrorKind) -> RetryAction
Create a new RetryAction
indicating that a retry is necessary.
sourcepub fn retryable_error_with_explicit_delay(
kind: ErrorKind,
retry_after: Duration
) -> RetryAction
pub fn retryable_error_with_explicit_delay( kind: ErrorKind, retry_after: Duration ) -> RetryAction
Create a new RetryAction
indicating that a retry is necessary after an explicit delay.
sourcepub fn transient_error() -> RetryAction
pub fn transient_error() -> RetryAction
Create a new RetryAction
indicating that a retry is necessary because of a transient error.
sourcepub fn throttling_error() -> RetryAction
pub fn throttling_error() -> RetryAction
Create a new RetryAction
indicating that a retry is necessary because of a throttling error.
sourcepub fn server_error() -> RetryAction
pub fn server_error() -> RetryAction
Create a new RetryAction
indicating that a retry is necessary because of a server error.
sourcepub fn client_error() -> RetryAction
pub fn client_error() -> RetryAction
Create a new RetryAction
indicating that a retry is necessary because of a client error.
sourcepub fn should_retry(&self) -> bool
pub fn should_retry(&self) -> bool
Check if a retry is indicated.
Trait Implementations§
source§impl Clone for RetryAction
impl Clone for RetryAction
source§fn clone(&self) -> RetryAction
fn clone(&self) -> RetryAction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RetryAction
impl Debug for RetryAction
source§impl Default for RetryAction
impl Default for RetryAction
source§fn default() -> RetryAction
fn default() -> RetryAction
source§impl Display for RetryAction
impl Display for RetryAction
source§impl PartialEq for RetryAction
impl PartialEq for RetryAction
source§fn eq(&self, other: &RetryAction) -> bool
fn eq(&self, other: &RetryAction) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for RetryAction
impl StructuralPartialEq for RetryAction
Auto Trait Implementations§
impl Freeze for RetryAction
impl RefUnwindSafe for RetryAction
impl Send for RetryAction
impl Sync for RetryAction
impl Unpin for RetryAction
impl UnwindSafe for RetryAction
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.