pub struct RetryFn<F> { /* private fields */ }
Expand description
A type that produces retryable futures.
Implementations§
source§impl<F, Fut, T, E> RetryFn<F>where
F: FnMut() -> Fut,
Fut: Future<Output = Result<T, E>>,
impl<F, Fut, T, E> RetryFn<F>where F: FnMut() -> Fut, Fut: Future<Output = Result<T, E>>,
sourcepub fn retries(
self,
max_retries: u32
) -> RetryFuture<F, Fut, NoBackoff, NoOnRetry> ⓘ
pub fn retries( self, max_retries: u32 ) -> RetryFuture<F, Fut, NoBackoff, NoOnRetry> ⓘ
Specify the number of times to retry the future.
sourcepub fn with_config<BackoffT, OnRetryT>(
self,
config: RetryFutureConfig<BackoffT, OnRetryT>
) -> RetryFuture<F, Fut, BackoffT, OnRetryT> ⓘ
pub fn with_config<BackoffT, OnRetryT>( self, config: RetryFutureConfig<BackoffT, OnRetryT> ) -> RetryFuture<F, Fut, BackoffT, OnRetryT> ⓘ
Create a retryable future from the given configuration.
Trait Implementations§
Auto Trait Implementations§
impl<F> RefUnwindSafe for RetryFn<F>where F: RefUnwindSafe,
impl<F> Send for RetryFn<F>where F: Send,
impl<F> Sync for RetryFn<F>where F: Sync,
impl<F> Unpin for RetryFn<F>where F: Unpin,
impl<F> UnwindSafe for RetryFn<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