Skip to main content

Spawn

Trait Spawn 

Source
pub trait Spawn: Send + Sync {
    // Required method
    fn spawn(&self, fut: BoxFuture<()>);
}
Expand description

Runs a future to completion in the background.

Required Methods§

Source

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

Starts fut; its output is discarded.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§