pub enum Backoff {
None,
Fixed {
delay: Duration,
},
Exponential {
initial: Duration,
max: Duration,
jitter: f64,
},
}Expand description
Backoff strategy between retry attempts.
Variants§
None
No delay between retries (immediate retry on timeout).
This is the default for backward compatibility. Consider using
Backoff::Exponential for production use to avoid overwhelming
agents under load.
Fixed
Fixed delay between each retry attempt.
Exponential
Exponential backoff: delay doubles after each attempt.
With jitter enabled (recommended), the actual delay is randomized within a range to prevent synchronized retries from multiple clients.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Backoff
impl RefUnwindSafe for Backoff
impl Send for Backoff
impl Sync for Backoff
impl Unpin for Backoff
impl UnwindSafe for Backoff
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