Trait pollster::FutureExt

source ·
pub trait FutureExt: Future {
    // Provided method
    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§

source

fn block_on(self) -> Self::Outputwhere
Self: Sized,

Block the thread until the future is ready.

Example
use pollster::FutureExt as _;

let my_fut = async {};

let result = my_fut.block_on();

Implementors§

source§

impl<F: Future> FutureExt for F