block_on

Function block_on 

Source
pub fn block_on<T>(fut: impl Future<Output = T>) -> T
Expand description

Run a future to completion on the current thread.

This doesn’t use the microtask executor, so it’s safe to call run_tasks from within the future. It’s also safe to call block_on recursively.