acter::api::api

Function waker_fn

Source
pub fn waker_fn<F: Fn() + Send + Sync + 'static>(f: F) -> Waker
Expand description

Converts a closure into a Waker.

The closure gets called every time the waker is woken.