pub trait RetryCallback: Send + Sync {
// Required method
fn on_retry(
&self,
attempt: usize,
max_retries: usize,
delay_secs: u64,
reason: String,
);
}Expand description
Callback invoked each time a retry is about to happen.
The implementer can use this to emit events or log the retry.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".