pub trait RetryPolicy {
// Required methods
fn retry(
&self,
error: &Error,
last_retry: Option<(usize, Duration)>,
) -> Option<Duration>;
fn set_reconnection_time(&mut self, duration: Duration);
}Required Methods§
Sourcefn retry(
&self,
error: &Error,
last_retry: Option<(usize, Duration)>,
) -> Option<Duration>
fn retry( &self, error: &Error, last_retry: Option<(usize, Duration)>, ) -> Option<Duration>
Submit a new retry delay based on the Error, last retry number and duration, if
available. A policy may also return None if it does not want to retry
Sourcefn set_reconnection_time(&mut self, duration: Duration)
fn set_reconnection_time(&mut self, duration: Duration)
Set a new reconnection time if received from an event