subscribed.event_machine

An event machine structure slightly resembling finite automata.

Members

Structs

EventMachine
struct EventMachine(State_, T = void delegate())

A state machine with simplified transitions - a wrapper around a state collection. State-dependent transitions should be implemented using beforeEach/afterEach hooks. A transition can be canceled by returning false from the any beforeEach listeners. The machine has an initial state and a set of alternative states (loops are permitted). Any state can transition to any other state (the initial state is unreachable after transitioning away from it).

Meta