I want to write some generic retry logic for a future.
I know the concrete return type and want to retry the same future.
My code only has access to the future - I do not want to wrap every fn call site in a closure to enable recreating it.
It seems that a "future" is a combination of (fn, args), and when .await
is called, it runs and waits for the result in place.
If I am able to clone all of the args, would it be possible to create a clone of the not-started future to retry it if it fails the first time?