pub struct RetryStrategy { /* private fields */ }Expand description
Retry strategy for sync operations
Implementations§
Source§impl RetryStrategy
impl RetryStrategy
Sourcepub fn new(max_retries: u32, base_delay_ms: u64) -> Self
pub fn new(max_retries: u32, base_delay_ms: u64) -> Self
Create a new retry strategy
§Arguments
max_retries- Maximum number of retry attemptsbase_delay_ms- Base delay in milliseconds (default: 1000)
Sourcepub fn default_strategy() -> Self
pub fn default_strategy() -> Self
Create default retry strategy (5 retries, 1 second base delay)
Sourcepub fn should_retry(&self, retry_count: u32) -> bool
pub fn should_retry(&self, retry_count: u32) -> bool
Check if we should retry
Sourcepub fn max_retries(&self) -> u32
pub fn max_retries(&self) -> u32
Get maximum retries
Trait Implementations§
Source§impl Clone for RetryStrategy
impl Clone for RetryStrategy
Source§fn clone(&self) -> RetryStrategy
fn clone(&self) -> RetryStrategy
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 RetryStrategy
impl Debug for RetryStrategy
Auto Trait Implementations§
impl Freeze for RetryStrategy
impl RefUnwindSafe for RetryStrategy
impl Send for RetryStrategy
impl Sync for RetryStrategy
impl Unpin for RetryStrategy
impl UnwindSafe for RetryStrategy
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