Skip to main content

ExecutorBlockOn

Trait ExecutorBlockOn 

Source
pub trait ExecutorBlockOn: Executor {
    // Required method
    fn block_on<F: Future>(&self, future: F) -> F::Output;
}

Required Methods§

Source

fn block_on<F: Future>(&self, future: F) -> F::Output

Blocks the current thread until the provided future has completed.

Note that calling this function within an executor context may cause a deadlock.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<E> ExecutorBlockOn for Arc<E>
where E: ExecutorBlockOn,

Source§

fn block_on<F: Future>(&self, f: F) -> F::Output

Source§

impl<E> ExecutorBlockOn for Rc<E>
where E: ExecutorBlockOn,

Source§

fn block_on<F: Future>(&self, f: F) -> F::Output

Implementors§