pub trait FutureExt: Future {
    fn block_on(self) -> Self::Output
    where
        Self: Sized
, { ... } }
Expand description

An extension trait that allows blocking on a future in suffix position.

Provided methods

Block the thread until the future is ready.

Example
use pollster::FutureExt as _;

let my_fut = async {};

let result = my_fut.block_on();

Implementors