View Source AshStateMachine.Info (ash_state_machine v0.2.0)

Introspection helpers for AshStateMachine

Link to this section Summary

Functions

A list of states that have been deprecated. The list of states is derived from the transitions normally. Use this option to express that certain types should still be included even though no transitions go to/from that state anymore.

A list of states that have been deprecated. The list of states is derived from the transitions normally. Use this option to express that certain types should still be included even though no transitions go to/from that state anymore.

The allowed starting states of this state machine.

The allowed starting states of this state machine.

state_machine DSL options

The attribute to store the state in.

The attribute to store the state in.

state_machine.transitions DSL entities

Link to this section Functions

Link to this function

state_machine_all_states(resource_or_dsl)

View Source
@spec state_machine_all_states(Ash.Resource.t() | map()) :: [atom()]
Link to this function

state_machine_default_initial_state(dsl_or_extended)

View Source
@spec state_machine_default_initial_state(dsl_or_extended :: module() | map()) ::
  {:ok, atom()} | :error

The default initial state

Link to this function

state_machine_default_initial_state!(dsl_or_extended)

View Source
@spec state_machine_default_initial_state!(dsl_or_extended :: module() | map()) ::
  atom() | no_return()

The default initial state

Link to this function

state_machine_deprecated_states(dsl_or_extended)

View Source
@spec state_machine_deprecated_states(dsl_or_extended :: module() | map()) ::
  {:ok, [atom()]} | :error

A list of states that have been deprecated. The list of states is derived from the transitions normally. Use this option to express that certain types should still be included even though no transitions go to/from that state anymore.

Link to this function

state_machine_deprecated_states!(dsl_or_extended)

View Source
@spec state_machine_deprecated_states!(dsl_or_extended :: module() | map()) ::
  [atom()] | no_return()

A list of states that have been deprecated. The list of states is derived from the transitions normally. Use this option to express that certain types should still be included even though no transitions go to/from that state anymore.

Link to this function

state_machine_initial_states(dsl_or_extended)

View Source
@spec state_machine_initial_states(dsl_or_extended :: module() | map()) ::
  {:ok, [atom()]} | :error

The allowed starting states of this state machine.

Link to this function

state_machine_initial_states!(dsl_or_extended)

View Source
@spec state_machine_initial_states!(dsl_or_extended :: module() | map()) ::
  [atom()] | no_return()

The allowed starting states of this state machine.

Link to this function

state_machine_options(dsl_or_extended)

View Source
@spec state_machine_options(dsl_or_extended :: module() | map()) :: %{
  required(atom()) => any()
}

state_machine DSL options

Returns a map containing the and any configured or default values.

Link to this function

state_machine_state_attribute(dsl_or_extended)

View Source
@spec state_machine_state_attribute(dsl_or_extended :: module() | map()) ::
  {:ok, atom()} | :error

The attribute to store the state in.

Link to this function

state_machine_state_attribute!(dsl_or_extended)

View Source
@spec state_machine_state_attribute!(dsl_or_extended :: module() | map()) ::
  atom() | no_return()

The attribute to store the state in.

Link to this function

state_machine_transitions(dsl_or_extended)

View Source
@spec state_machine_transitions(dsl_or_extended :: module() | map()) :: [struct()]

state_machine.transitions DSL entities

Link to this function

state_machine_transitions(resource_or_dsl, name)

View Source
@spec state_machine_transitions(Ash.Resource.t() | map(), name :: atom()) :: [
  AshStateMachine.Transition.t()
]