View Source AshStateMachine.Info (ash_state_machine v0.2.7)

Introspection helpers for AshStateMachine

Summary

Functions

A list of states that have been deprecated but are still valid. These will still be in the possible list of states, but :* will not include them.

A list of states that have been deprecated but are still valid. These will still be in the possible list of states, but :* will not include them.

A list of states that may be used by transitions to/from :*. See the docs on wildcards for more.

A list of states that may be used by transitions to/from :*. See the docs on wildcards for more.

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

Functions

state_machine_all_states(resource_or_dsl)

@spec state_machine_all_states(Ash.Resource.t() | map()) :: [atom()]

state_machine_default_initial_state(dsl_or_extended)

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

The default initial state

state_machine_default_initial_state!(dsl_or_extended)

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

The default initial state

state_machine_deprecated_states(dsl_or_extended)

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

A list of states that have been deprecated but are still valid. These will still be in the possible list of states, but :* will not include them.

state_machine_deprecated_states!(dsl_or_extended)

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

A list of states that have been deprecated but are still valid. These will still be in the possible list of states, but :* will not include them.

state_machine_extra_states(dsl_or_extended)

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

A list of states that may be used by transitions to/from :*. See the docs on wildcards for more.

state_machine_extra_states!(dsl_or_extended)

@spec state_machine_extra_states!(dsl_or_extended :: module() | map()) ::
  [atom()] | no_return()

A list of states that may be used by transitions to/from :*. See the docs on wildcards for more.

state_machine_initial_states(dsl_or_extended)

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

The allowed starting states of this state machine.

state_machine_initial_states!(dsl_or_extended)

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

The allowed starting states of this state machine.

state_machine_options(dsl_or_extended)

@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.

state_machine_state_attribute(dsl_or_extended)

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

The attribute to store the state in.

state_machine_state_attribute!(dsl_or_extended)

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

The attribute to store the state in.

state_machine_transitions(dsl_or_extended)

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

state_machine.transitions DSL entities

state_machine_transitions(resource_or_dsl, name)

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