pub fn retry_n<R, E>( max_tries: NonZeroU32, sleep_ms: u64, f: impl Fn() -> Result<R, E>, ) -> Result<R, E>
Rerun f until it returns Ok or max_tries has run out. Sleeps a constant time between tries.
f
max_tries