block_on

Function block_on 

Source
pub fn block_on<T>(future: impl Future<Output = T>) -> Result<T, Error>
Expand description

Runs a future to completion. The given future is treated as a simple state machine. It will be executed entirely on the current thread, and this function will not return until the future completes.

ยงErrors

If polling the future returns Poll::Pending, this function will return an error.