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 never() -> RetryPolicy<T, U, F>
pub fn never() -> RetryPolicy<T, U, F>
Never retry.
sourcepub fn retry_on<E, F2>(self, f: F2) -> RetryPolicy<T, U, F2>
pub fn retry_on<E, F2>(self, f: F2) -> RetryPolicy<T, U, F2>
Retry on.
sourcepub fn retry_on_with_max_wait_secs<E, F2>(
self,
f: F2,
secs: u64
) -> RetryPolicy<T, U, F2>
pub fn retry_on_with_max_wait_secs<E, F2>( self, f: F2, secs: u64 ) -> RetryPolicy<T, U, F2>
Retry on with max wait secs.
Trait Implementations§
source§impl<T, U, F> Clone for RetryPolicy<T, U, F>where
F: Clone,
impl<T, U, F> Clone for RetryPolicy<T, U, F>where
F: Clone,
source§fn clone(&self) -> RetryPolicy<T, U, F>
fn clone(&self) -> RetryPolicy<T, U, F>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<T, U, F> Debug for RetryPolicy<T, U, F>
impl<T, U, F> Debug for RetryPolicy<T, U, F>
source§impl<T, U> Default for RetryPolicy<T, U>
impl<T, U> Default for RetryPolicy<T, U>
source§fn default() -> RetryPolicy<T, U>
fn default() -> RetryPolicy<T, U>
Returns the “default value” for a type. Read more
source§impl<T, U, E, F> Policy<T, U, E> for RetryPolicy<T, U, F>
impl<T, U, E, F> Policy<T, U, E> for RetryPolicy<T, U, F>
§type Future = Pin<Box<dyn Future<Output = RetryPolicy<T, U, F>> + Send>>
type Future = Pin<Box<dyn Future<Output = RetryPolicy<T, U, F>> + Send>>
The
Future type returned by Policy::retry.impl<T, U, F> Copy for RetryPolicy<T, U, F>where
F: Copy,
Auto Trait Implementations§
impl<T, U, F> RefUnwindSafe for RetryPolicy<T, U, F>where
F: RefUnwindSafe,
impl<T, U, F> Send for RetryPolicy<T, U, F>where
F: Send,
impl<T, U, F> Sync for RetryPolicy<T, U, F>where
F: Sync,
impl<T, U, F> Unpin for RetryPolicy<T, U, F>where
F: Unpin,
impl<T, U, F> UnwindSafe for RetryPolicy<T, U, F>where
F: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more