pub struct RetryPolicy {
pub max_attempts: u32,
pub initial_interval: Duration,
pub backoff_factor: f64,
pub max_interval: Duration,
pub jitter: bool,
pub retry_on: Option<Arc<dyn Fn(&JunctureError) -> bool + Send + Sync>>,
}Expand description
Retry policy for node execution
Defines how nodes should retry on failure with configurable backoff, jitter, and retry conditions.
Fields§
§max_attempts: u32Maximum number of retry attempts
initial_interval: DurationInitial interval between retries
backoff_factor: f64Backoff multiplier (e.g., 2.0 for exponential backoff)
max_interval: DurationMaximum interval between retries (caps exponential growth)
jitter: boolWhether to add random jitter to prevent thundering herd
retry_on: Option<Arc<dyn Fn(&JunctureError) -> bool + Send + Sync>>Optional predicate to determine if an error is retryable
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 (const: unstable) · 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 !RefUnwindSafe for RetryPolicy
impl !UnwindSafe for RetryPolicy
impl Freeze for RetryPolicy
impl Send for RetryPolicy
impl Sync for RetryPolicy
impl Unpin for RetryPolicy
impl UnsafeUnpin 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