pub enum Retryability {
Retryable {
retry_after: Option<Duration>,
},
NonRetryable,
}Expand description
Indicates whether a failed operation can safely be retried.
Variants§
Retryable
The operation may succeed on retry, optionally honoring a server-provided delay.
NonRetryable
The error is terminal for the current inputs or state.
Implementations§
Source§impl Retryability
impl Retryability
Sourcepub const fn is_retryable(self) -> bool
pub const fn is_retryable(self) -> bool
Returns true when the failure is retryable.
Sourcepub const fn retry_after(self) -> Option<Duration>
pub const fn retry_after(self) -> Option<Duration>
Returns any explicit retry delay hint, if present.
Trait Implementations§
Source§impl Clone for Retryability
impl Clone for Retryability
impl Copy for Retryability
Source§impl Debug for Retryability
impl Debug for Retryability
impl Eq for Retryability
Source§impl Hash for Retryability
impl Hash for Retryability
Source§impl PartialEq for Retryability
impl PartialEq for Retryability
impl StructuralPartialEq for Retryability
Auto Trait Implementations§
impl Forget for Retryability
impl Freeze for Retryability
impl Move for Retryability
impl RefUnwindSafe for Retryability
impl Send for Retryability
impl Sync for Retryability
impl Unpin for Retryability
impl UnsafeUnpin for Retryability
impl UnwindSafe for Retryability
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