Skip to main content

Spawn

Trait Spawn 

pub trait Spawn {
    // Required method
    fn spawn_bg(&mut self, future: impl Future<Output = ()> + Send + 'static);
}
Available on crate features dns and hickory only.
Expand description

A type defines the Handle which can spawn future.

Required Methods§

fn spawn_bg(&mut self, future: impl Future<Output = ()> + Send + 'static)

Spawn a future in the background

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§