View Source Protean.Guard protocol (Protean v0.0.3)
Protocol for guarded transitions, actions, etc.
Default implementations are provided for:
BitString
- Call callback module with string, state, and eventAtom
- Call callback module with atom, state, and eventFunction
- Call function with state and eventTuple
- Higher-order guard utilities:{:and, [guard1, ...]}
{:or, [guard1, ...]}
{:not, guard}
{:in, query}
- Delegates toProtean.State.matches?/2
Link to this section Summary
Link to this section Types
@type guard() :: term()
Implements Protean.Guard
protocol.
@type t() :: term()
Link to this section Functions
@spec allows?(t(), Protean.State.t(), Protean.event(), callback_module :: module()) :: boolean()