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
B

Trait Implementations

impl<X, AA, BB> Machine for Compose2<AA, BB> where AA: Machine<Context=X>, BB: Machine<Context=X>

type Context = X

type Seed = Compose2Seed<AA::Seed, BB::Seed>

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

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

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

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

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

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