pub struct RetryState {
pub attempts: usize,
pub last_retry_time: u64,
pub next_retry_time: u64,
}Expand description
Retry state for tracking retry attempts and timing
Fields§
§attempts: usizeNumber of retry attempts made so far
last_retry_time: u64Timestamp of last retry attempt (milliseconds since epoch)
next_retry_time: u64Timestamp when next retry should occur (milliseconds since epoch)
Implementations§
Source§impl RetryState
impl RetryState
Sourcepub fn record_attempt(&mut self, next_delay_ms: u64)
pub fn record_attempt(&mut self, next_delay_ms: u64)
Update retry state after a failed attempt
Trait Implementations§
Source§impl Clone for RetryState
impl Clone for RetryState
Source§fn clone(&self) -> RetryState
fn clone(&self) -> RetryState
Returns a duplicate 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 RetryState
impl Debug for RetryState
Source§impl Default for RetryState
impl Default for RetryState
Source§impl<'de> Deserialize<'de> for RetryState
impl<'de> Deserialize<'de> for RetryState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RetryState
impl RefUnwindSafe for RetryState
impl Send for RetryState
impl Sync for RetryState
impl Unpin for RetryState
impl UnwindSafe for RetryState
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