Function retry::retry_with_index[][src]

pub fn retry_with_index<I, O, R, E, OR>(
    iterable: I,
    operation: O
) -> Result<R, Error<E>> where
    I: IntoIterator<Item = Duration>,
    O: FnMut(u64) -> OR,
    OR: Into<OperationResult<R, E>>, 

Retry the given operation synchronously until it succeeds, or until the given Duration iterator ends, with each iteration of the operation receiving the number of the attempt as an argument.