pub fn waker_fn<F: Fn() + Send + Sync + 'static>(f: F) -> Waker
Converts a closure into a Waker.
Waker
The closure gets called every time the waker is woken.