Trait concurrency_traits::ThreadSpawner[][src]

pub trait ThreadSpawner {
    type SpawnReturn;
    type SpawnError;
    fn spawn(
        self,
        function: impl FnOnce() + 'static + Send
    ) -> Result<Self::SpawnReturn, Self::SpawnError>; }

A spawner for new threads.

Associated Types

type SpawnReturn[src]

The return value from ThreadSpawner::spawn

type SpawnError[src]

The error that can be returned

Loading content...

Required methods

fn spawn(
    self,
    function: impl FnOnce() + 'static + Send
) -> Result<Self::SpawnReturn, Self::SpawnError>
[src]

Spawns a new thread running function

Loading content...

Implementors

Loading content...