pub trait RetryPolicy: Clone {
// Required methods
fn next_delay(&mut self, attempt: u32) -> Option<Duration>;
fn reset(&mut self);
}Expand description
Defines a retry policy for async operations.
Implementations determine when and how long to wait between retry attempts.
Required Methods§
Sourcefn next_delay(&mut self, attempt: u32) -> Option<Duration>
fn next_delay(&mut self, attempt: u32) -> Option<Duration>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.