pub struct RetryConfig {
pub max_retries: u32,
pub base_delay_ms: u64,
pub max_delay_ms: u64,
pub jitter: bool,
pub should_retry: Option<Box<dyn Fn(&str) -> bool + Send + Sync>>,
}Expand description
Configuration for retry behavior
Fields§
§max_retries: u32Maximum number of retries (default: 10)
base_delay_ms: u64Base delay in milliseconds (default: 500)
max_delay_ms: u64Maximum delay cap in milliseconds (default: 32000)
jitter: boolEnable jitter (default: true)
should_retry: Option<Box<dyn Fn(&str) -> bool + Send + Sync>>Retry on specific error conditions (takes error message as string)
Implementations§
Source§impl RetryConfig
impl RetryConfig
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RetryConfig
impl !RefUnwindSafe for RetryConfig
impl Send for RetryConfig
impl Sync for RetryConfig
impl Unpin for RetryConfig
impl UnsafeUnpin for RetryConfig
impl !UnwindSafe for RetryConfig
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