Function spawn_fn
Source pub fn spawn_fn<F, R>(f: F)
Expand description
Spawn a closure to the current main loop
This only works if running inside the run() function of the main loop
This is an equivalent of:
§Panics
This function panics if there is no currently running loop (i.e. this
function is not running from the inside of run().