state_machine v0.1.1 StateMachine.Transition

Link to this section Summary

Link to this section Types

Link to this type

t(model)
t(model) :: %StateMachine.Transition{
  after: [StateMachine.Callback.t(model)],
  before: [StateMachine.Callback.t(model)],
  from: atom(),
  guards: [StateMachine.Guard.t(model)],
  to: atom()
}

Link to this section Functions

Link to this function

after_(ctx, transition)
after_(StateMachine.Context.t(model), t(model)) ::
  StateMachine.Context.t(model)

Link to this function

before(ctx, transition)
before(StateMachine.Context.t(model), t(model)) ::
  StateMachine.Context.t(model)

Link to this function

is_allowed?(ctx, transition)
is_allowed?(StateMachine.Context.t(model), t(model)) :: boolean()

Link to this function

run(ctx, transition)
run(StateMachine.Context.t(model), t(model)) :: StateMachine.Context.t(model)

Link to this function

update_state(ctx)
update_state(StateMachine.Context.t(model)) :: StateMachine.Context.t(model)