pub fn run<F, R>(self, try_it: F) -> impl Future<Item = I, Error = E>
    where
        I: Debug + Send,
        E: Debug + Send + Sync + 'static,
        F: Fn() -> R + Send,
        R: Future<Item = I, Error = E> + Send,
    {
        let operation_name = self.inner.operation_name;
        let logger = self.inner.logger.clone();
        let condition = self.inner.condition;
        let log_after = self.inner.log_after;
        let limit_opt = self.inner.limit.unwrap(&operation_name, "limit");

        trace!(logger, "Run with retry: {}", operation_name);

        run_retry(
            operation_name,
            logger,
            condition,
            log_after,
            limit_opt,
            // No timeout, so all errors are inner errors
            move || try_it().map_err(TimeoutError::Inner),
        )
        .map_err(|e| {
            // No timeout, so all errors are inner errors
            e.into_inner().unwrap()
        })
    }
/// Rerun the provided function as many times as needed.
Rerun the provided function as many times as needed.
Rerun the provided function as many times as needed .
pub fn run<F, R>(self, try_it: F) -> impl Future<Item = I, Error = E>
    where
        I: Debug + Send,
        E: Debug + Send + Sync + 'static,
        F: Fn() -> R + Send,
        R: Future<Item = I, Error = E> + Send,
    {
        let operation_name = self.inner.operation_name;
        let logger = self.inner.logger.clone();
        let condition = self.inner.condition;
        let log_after = self.inner.log_after;
        let limit_opt = self.inner.limit.unwrap(&operation_name, "limit");
        trace!(logger, "Run with retry: {}", operation_name);
        run_retry(
            operation_name,
            logger,
            condition,
            log_after,
            limit_opt,
            // No timeout, so all errors are inner errors
            move || try_it().map_err(TimeoutError::Inner),
        )
        .map_err(|e| {
            // No timeout, so all errors are inner errors
            e.into_inner().unwrap()
        })
    }
pub fn run < F , R > ( self , try_it : F ) -> impl Future < Item = I , Error = E > where I : Debug + Send , E : Debug + Send + Sync + ' static , F : Fn ( ) -> R + Send , R : Future < Item = I , Error = E > + Send , { let operation_name = self . inner . operation_name ; let logger = self . inner . logger . clone ( ) ; let condition = self . inner . condition ; let log_after = self . inner . log_after ; let limit_opt = self . inner . limit . unwrap ( & operation_name , " " ) ; trace ! ( logger " " operation_name ) ; run_retry ( operation_name , logger , condition , log_after , limit_opt , // No timeout, so all errors are inner errors move | | try_it ( ) . map_err ( TimeoutError :: Inner ) , ) . map_err ( | e | { // No timeout, so all errors are inner errors e . into_inner ( ) . unwrap ( ) } ) }
Rerun the provided function as many times as needed.
Rerun the provided function as many times as needed .
self
try_it
F
self
try_it
F