EventMachine.on

A function for appending listeners to the state event. Can also be called using the alias on!#{stateName}, where the state name is a string.

struct EventMachine(State_, T = void delegate())
version(D_Ddoc)
void
on
(
State state
)
if (
is(typeof(State_.init)) &&
State_.min != State_.max
&&
isCallable!T
)

Parameters

state

The state whose event to subscribe to.

listeners EventType.ListenerType[]

The listeners to append.

See Also

subscribed.event.Event.append

Meta