Skip to main content

Spawn

Trait Spawn 

Source
pub trait Spawn<Target>
where Target: Send + 'static,
{ // Required methods fn spawn(self) -> Result<Target>; fn co_spawn(self) -> BoxedFuture<Result<Target>>; }
Available on crate feature process only.
Expand description

This trait allows implementing different return types for Command::spawn based on the configured IO.

Required Methods§

Source

fn spawn(self) -> Result<Target>

Source

fn co_spawn(self) -> BoxedFuture<Result<Target>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§