Enum exc_core::retry::RetryPolicy
source · pub enum RetryPolicy<T, U, F = ()> {
On {
f: F,
times: usize,
max_secs: u64,
},
Never(PhantomData<fn() -> (T, U)>),
}Expand description
Retry Policy.
Variants§
Implementations§
source§impl<T, U, F> RetryPolicy<T, U, F>
impl<T, U, F> RetryPolicy<T, U, F>
sourcepub fn retry_on<E, F2>(self, f: F2) -> RetryPolicy<T, U, F2>where
F2: Fn(&E) -> bool + Send + 'static + Clone,
pub fn retry_on<E, F2>(self, f: F2) -> RetryPolicy<T, U, F2>where
F2: Fn(&E) -> bool + Send + 'static + Clone,
Retry on.
sourcepub fn retry_on_with_max_wait_secs<E, F2>(
self,
f: F2,
secs: u64
) -> RetryPolicy<T, U, F2>where
F2: Fn(&E) -> bool + Send + 'static + Clone,
pub fn retry_on_with_max_wait_secs<E, F2>(
self,
f: F2,
secs: u64
) -> RetryPolicy<T, U, F2>where
F2: Fn(&E) -> bool + Send + 'static + Clone,
Retry on with max wait secs.