Enum rotor::Compose2
[−]
[src]
pub enum Compose2<A: Sized, B: Sized> { A(A), B(B), }
Composes two state machines
Used to "mount" two different application into single main loop, or to use multiple protocols simultaneously. Can be nested to any level.
We will probably implement n > 2 composition later, for effeciency reasons.
Variants
A(A)
B(B)
Trait Implementations
impl<X, AA, BB> Machine for Compose2<AA, BB> where AA: Machine<Context=X>, BB: Machine<Context=X>
[src]
type Context = X
Context type for the state machine Read more
type Seed = Compose2Seed<AA::Seed, BB::Seed>
Seed is piece of data that is needed to initialize the machine Read more
fn create(seed: Self::Seed, scope: &mut Scope<X>) -> Response<Self, Void>
Create a machine from some data Read more
fn ready(self, events: EventSet, scope: &mut Scope<X>) -> Response<Self, Self::Seed>
Socket readiness notification
fn spawned(self, scope: &mut Scope<X>) -> Response<Self, Self::Seed>
Called after spawn event Read more
fn timeout(self, scope: &mut Scope<X>) -> Response<Self, Self::Seed>
Timeout happened
fn wakeup(self, scope: &mut Scope<X>) -> 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>
Called instead of spawned, if there is no slab space Read more