[−][src]Struct tryhard::backoff_strategies::CustomBackoffStrategy
A custom backoff strategy defined by a function.
Trait Implementations
impl<F, E, T> BackoffStrategy<E> for CustomBackoffStrategy<F> where
F: FnMut(u32, &E) -> T,
T: Into<RetryPolicy>,
[src]
F: FnMut(u32, &E) -> T,
T: Into<RetryPolicy>,
type Output = RetryPolicy
The delay type. Will normally be either Duration
or RetryPolicy
. Read more
pub fn delay(&mut self, attempt: u32, error: &E) -> RetryPolicy
[src]
impl<F: Clone> Clone for CustomBackoffStrategy<F>
[src]
pub fn clone(&self) -> CustomBackoffStrategy<F>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<F: Copy> Copy for CustomBackoffStrategy<F>
[src]
impl<F> Debug for CustomBackoffStrategy<F>
[src]
Auto Trait Implementations
impl<F> RefUnwindSafe for CustomBackoffStrategy<F> where
F: RefUnwindSafe,
[src]
F: RefUnwindSafe,
impl<F> Send for CustomBackoffStrategy<F> where
F: Send,
[src]
F: Send,
impl<F> Sync for CustomBackoffStrategy<F> where
F: Sync,
[src]
F: Sync,
impl<F> Unpin for CustomBackoffStrategy<F> where
F: Unpin,
[src]
F: Unpin,
impl<F> UnwindSafe for CustomBackoffStrategy<F> where
F: UnwindSafe,
[src]
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,