pub fn run<F>(future: F, wait: impl FnMut()) -> F::Outputwhere
F: Future,Expand description
Runs the provided future until polling succeeds, calling the provided wait closure in between
each polling attempt.
A common pattern is to let wait simply be some delay function (like sleep()), or in certain
environments (such as on embedded devices), it might make sense to call wfi to wait for
peripheral interrupts, if you know that to be the source of future completion.