View Source Protean.Transition (Protean v0.1.0-alpha.0)

TODO

Event descriptors Guards Internal Exact Actions

Link to this section Summary

Functions

Return the actions associated with a transition

Checks whether the transition is enabled for the given event.

Link to this section Types

@type t() :: %Protean.Transition{
  actions: [Protean.Action.t()],
  domain: Protean.Node.id(),
  guard: Protean.Guard.guard(),
  internal: boolean(),
  match?: (term() -> boolean()) | term() | nil,
  source_id: Protean.Node.id(),
  target_ids: [Protean.Node.id()] | nil
}

Link to this section Functions

@spec actions(t()) :: [Protean.Action.t()]

Return the actions associated with a transition

@spec domain(t()) :: Protean.Node.id()
Link to this function

enabled?(transition, event, state, module)

View Source
@spec enabled?(
  t(),
  Protean.event() | nil,
  Protean.State.t(),
  callback_module :: module()
) :: boolean()

Checks whether the transition is enabled for the given event.