View Source Protean.Guard protocol (Protean v0.0.1)

Protocol for guarded transitions, actions, etc.

Default implementations are provided for:

  • BitString - Call handler module with string, 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, handler)

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