StateQueue.this

Constructor.

  1. this()
  2. this(Promise!State delegate(State) stateFunc, State initialState)
    struct StateQueue(State)
    this
    (
    Promise!State delegate
    (
    State
    )
    stateFunc
    ,
    State initialState = State.init
    )

Parameters

stateFunc Promise!State delegate
(
State
)

The function implementing the state transition operation. Accepts the goal state, and returns a promise which is the resulting (ideally but not necessarily, the goal) state. If the returned promise is rejected, it indicates that the state hasn't changed and the goal cannot be reached.

initialState State

The initial state.

Meta