Skip to main content

Spawner

Trait Spawner 

Source
pub trait Spawner {
    type Child: Machine<Seed = Void>;
    type Seed;

    // Required method
    fn spawn(
        seed: Self::Seed,
        scope: &mut Scope<'_, <Self::Child as Machine>::Context>,
    ) -> Response<Self::Child, Void>;
}

Required Associated Types§

Required Methods§

Source

fn spawn( seed: Self::Seed, scope: &mut Scope<'_, <Self::Child as Machine>::Context>, ) -> Response<Self::Child, Void>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T, C, S> Spawner for Uniform<T>
where T: Spawner<Seed = S> + Action<Seed = S, Context = C>,

Source§

type Child = <T as Spawner>::Child

Source§

type Seed = <T as Spawner>::Seed