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(S)
Child(S::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>,
[src]
S: Spawner<Child = C, Seed = D> + Machine<Context = C::Context, Seed = D>,
C: Machine<Seed = Void>,
type Context = <S::Child as Machine>::Context
Context type for the state machine Read more
type Seed = <S as Spawner>::Seed
Seed is piece of data that is needed to initialize the machine Read more
fn create(
seed: <S as Spawner>::Seed,
scope: &mut Scope<Self::Context>
) -> Response<Self, Void>
seed: <S as Spawner>::Seed,
scope: &mut Scope<Self::Context>
) -> Response<Self, Void>
Create a machine from some data Read more
fn ready(
self,
events: EventSet,
scope: &mut Scope<Self::Context>
) -> Response<Self, Self::Seed>
self,
events: EventSet,
scope: &mut Scope<Self::Context>
) -> Response<Self, Self::Seed>
Socket readiness notification
fn spawned(self, scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>
Called after spawn event Read more
fn timeout(self, scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>
Timeout happened
fn wakeup(self, scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>
Message received Read more
fn spawn_error(
self,
_scope: &mut Scope<Self::Context>,
error: SpawnError<Self::Seed>
) -> Response<Self, Self::Seed>
self,
_scope: &mut Scope<Self::Context>,
error: SpawnError<Self::Seed>
) -> Response<Self, Self::Seed>
Called instead of spawned, if there is no slab space Read more