pub struct RetryPolicy {
pub max_retries: u32,
pub initial_delay_ms: u64,
pub max_delay_ms: u64,
pub jitter_max_ms: u64,
pub enabled: bool,
pub retry_search: bool,
pub retry_info: bool,
pub retry_comments: bool,
pub retry_pkgbuild: bool,
}Expand description
What: Configuration for retry policies with exponential backoff and jitter.
Inputs: None (created via RetryPolicy::default() or builder methods)
Output: RetryPolicy instance with configurable retry behavior
Details:
- Controls retry behavior for transient network failures
- Supports per-operation-type configuration
- Uses exponential backoff with jitter to prevent thundering herd
- Can be disabled globally or per operation
Fields§
§max_retries: u32Maximum number of retry attempts (default: 3).
initial_delay_ms: u64Initial delay in milliseconds before first retry (default: 1000).
max_delay_ms: u64Maximum delay in milliseconds (default: 30000).
jitter_max_ms: u64Maximum jitter in milliseconds to add to delays (default: 500).
enabled: boolWhether retries are enabled globally (default: true).
retry_search: boolWhether to retry search operations (default: true).
retry_info: boolWhether to retry info operations (default: true).
retry_comments: boolWhether to retry comments operations (default: true).
retry_pkgbuild: boolWhether to retry pkgbuild operations (default: true).
Trait Implementations§
Source§impl Clone for RetryPolicy
impl Clone for RetryPolicy
Source§fn clone(&self) -> RetryPolicy
fn clone(&self) -> RetryPolicy
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 RetryPolicy
impl Debug for RetryPolicy
Auto Trait Implementations§
impl Freeze for RetryPolicy
impl RefUnwindSafe for RetryPolicy
impl Send for RetryPolicy
impl Sync for RetryPolicy
impl Unpin for RetryPolicy
impl UnwindSafe for RetryPolicy
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