pub fn retry<F, T, E>(closure: F, retries: usize) -> Result<T, E>where F: FnMut() -> Result<T, E>, E: Debug,
Calls the closure until it returns a non-error Result. If it has been re-tried retries times, the last result is returned.
closure
retries