View Source Protean.Guard protocol (Protean v0.1.0-alpha.0)

Protocol for guarded transitions, actions, etc.

Default implementations are provided for:

  • BitString - Call callback module with string, state, and event
  • Atom - Call callback module with atom, state, and event
  • Function - Call function with state and event
  • Tuple - Higher-order guard utilities:

Link to this section Summary

Types

Implements Protean.Guard protocol.

t()

Link to this section Types

@type guard() :: term()

Implements Protean.Guard protocol.

@type t() :: term()

Link to this section Functions

Link to this function

allows?(guard, state, event, module)

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