pub struct RetrySchedule {
pub max_attempts: u32,
pub initial_delay: Duration,
pub max_delay: Duration,
}Expand description
Bounded exponential-backoff schedule — the shared timing vocabulary for
retries, used by both the call engine and (later) webhook handler retry.
It holds no HTTP concepts: per-attempt delay doubles up to max_delay and
total attempts are capped by max_attempts.
Fields§
§max_attempts: u32§initial_delay: Duration§max_delay: DurationImplementations§
Source§impl RetrySchedule
impl RetrySchedule
Sourcepub const fn transient() -> Self
pub const fn transient() -> Self
Conservative default for transient errors: 3 attempts, 100ms → 200ms → 400ms (cap 1s).
Sourcepub fn attempts(self, max_attempts: u32) -> Self
pub fn attempts(self, max_attempts: u32) -> Self
Sets the maximum number of attempts — a chainable tweak over a preset.
Trait Implementations§
Source§impl Clone for RetrySchedule
impl Clone for RetrySchedule
impl Copy for RetrySchedule
Source§impl Debug for RetrySchedule
impl Debug for RetrySchedule
Auto Trait Implementations§
impl Forget for RetrySchedule
impl Freeze for RetrySchedule
impl Move for RetrySchedule
impl RefUnwindSafe for RetrySchedule
impl Send for RetrySchedule
impl Sync for RetrySchedule
impl Unpin for RetrySchedule
impl UnsafeUnpin for RetrySchedule
impl UnwindSafe for RetrySchedule
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