block_on

Function block_on 

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

Run async code synchronously.

This is a convenience function for running a single async operation without managing a runtime.

ยงErrors

Returns an error if the runtime cannot be created.