Function pollster::block_on

source ·
pub fn block_on<F: Future>(fut: F) -> F::Output
Expand description

Block the thread until the future is ready.

Example

let my_fut = async {};
let result = pollster::block_on(my_fut);