Enum rotor_tools::compose::Spawn [] [src]

pub enum Spawn<S: Spawner> {
    Spawner(S),
    Child(S::Child),
}

Composes two state machines where of the state machines spawns multiple instances of another one

Variants

Spawner
Child

Trait Implementations

impl<S, C, D> Machine for Spawn<S> where S: Spawner<Child=C, Seed=D> + Machine<Context=C::Context, Seed=D>, C: Machine<Seed=Void>

type Context = S::Child::Context

type Seed = S::Seed

fn create(seed: S::Seed, scope: &mut Scope<Self::Context>) -> Response<Self, Void>

fn ready(self, events: EventSet, scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>

fn spawned(self, scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>

fn timeout(self, scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>

fn wakeup(self, scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>

fn spawn_error(self, _scope: &mut Scope<Self::Context>, error: SpawnError<Self::Seed>) -> Response<Self, Self::Seed>