state_machine v0.1.1 StateMachine.Event

Link to this section Summary

Link to this section Types

Link to this type

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

Link to this section Functions

Link to this function

is_allowed?(ctx, event)
is_allowed?(StateMachine.Context.t(model), t(model) | atom()) :: boolean()

Link to this function

trigger(ctx, event, payload \\ nil)
trigger(StateMachine.Context.t(model), atom(), any()) ::
  StateMachine.Context.t(model)