ecto_fsm v0.2.0 Ecto.FSM.Machine View Source

Provides functions for using FSMs.

Link to this section Summary

Functions

Returns true if given action is available

Returns available actions

Meta application of the transition function, using find_handler/2 to find the module implementing it

Returns global bypasses

Returns handler for given action, if any

Returns info for particular transition

Returns Ecto.FSM.specs() built from all handlers

Returns global doc

Link to this section Types

Link to this type

meta_event_error() View Source
meta_event_error() :: :illegal_action | term()

Link to this type

meta_event_reply() View Source
meta_event_reply() ::
  {:ok, Ecto.FSM.Machine.State.t()} | {:error, meta_event_error()}

Link to this section Functions

Link to this function

action_available?(state, action) View Source
action_available?(Ecto.FSM.Machine.State.t(), Ecto.FSM.trans()) :: boolean()

Returns true if given action is available

Link to this function

available_actions(state) View Source
available_actions(Ecto.FSM.Machine.State.t()) :: [Ecto.FSM.trans()]

Returns available actions

Meta application of the transition function, using find_handler/2 to find the module implementing it.

Returns global bypasses

Link to this function

find_bypass_handler(state, trans) View Source
find_bypass_handler(Ecto.FSM.Machine.State.t(), Ecto.FSM.trans()) ::
  Ecto.FSM.handler() | nil

Find bypass

Returns handler for given action, if any

Link to this function

find_info(state, trans) View Source
find_info(Ecto.FSM.state(), Ecto.FSM.trans()) :: Ecto.FSM.info() | nil

Returns info for particular transition

Returns Ecto.FSM.specs() built from all handlers

Returns global doc