Skip to main content

Spawner

Trait Spawner 

Source
pub trait Spawner: MaybeSend + MaybeSync {
    // Required method
    fn spawn(&self, fut: BoxFuture<'static, ()>);
}
Expand description

Injected task spawner: tokio on native, wasm_bindgen_futures or ctx.wait_until on Workers.

Required Methods§

Source

fn spawn(&self, fut: BoxFuture<'static, ()>)

Run fut to completion in the background.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§