Function block_on
pub fn block_on<F>(fut: F) -> <F as Future>::Outputwhere
F: Future,
Available on crate feature
threading
only.Expand description
Runs a future to completion.
This runs the given future on the current thread, blocking until it is complete, and yielding its resolved result.
ยงPanics
Panics when not called from a thread.