Trait RetryInterceptor
pub trait RetryInterceptor:
Send
+ Sync
+ 'static {
// Required method
fn intercept(&self, event: RetryEvent<'_>);
}Available on crate feature
layers-retry only.Expand description
RetryInterceptor observes retry attempts before the retry sleep.
Required Methods§
fn intercept(&self, event: RetryEvent<'_>)
fn intercept(&self, event: RetryEvent<'_>)
Called before each retry sleep.
§Notes
The intercept must be quick and non-blocking. No heavy IO is allowed. Otherwise, the retry will be blocked.