fsmx v0.5.0 Fsmx View Source

Link to this section Summary

Link to this section Types

Specs

opts_t() :: [{:state_field, atom()}]

Specs

state_t() :: binary() | atom()

Link to this section Functions

Link to this function

transition(struct, new_state, opts \\ [])

View Source

Specs

transition(struct(), state_t(), opts_t()) :: {:ok, struct()} | {:error, any()}
Link to this function

transition_changeset(schema, new_state, params \\ %{}, opts \\ [])

View Source

Specs

transition_changeset(struct(), state_t(), map(), opts_t()) :: Ecto.Changeset.t()
Link to this function

transition_multi(multi, schema, id, new_state, params \\ %{}, opts \\ [])

View Source

Specs

transition_multi(Ecto.Multi.t(), struct(), any(), state_t(), map(), opts_t()) ::
  Ecto.Multi.t()