[−][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,
RetryPolicy: From<T>,
[src]
F: FnMut(u32, &E) -> T,
RetryPolicy: From<T>,
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: Debug> Debug for CustomBackoffStrategy<F>
[src]
Auto Trait Implementations
impl<F> RefUnwindSafe for CustomBackoffStrategy<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for CustomBackoffStrategy<F> where
F: Send,
F: Send,
impl<F> Sync for CustomBackoffStrategy<F> where
F: Sync,
F: Sync,
impl<F> Unpin for CustomBackoffStrategy<F> where
F: Unpin,
F: Unpin,
impl<F> UnwindSafe for CustomBackoffStrategy<F> where
F: UnwindSafe,
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, 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>,