View Source Protean.Context (Protean v0.1.0)

State available to observers of and callbacks in a machine.

Functions in this module should rarely be used directly. Instead, rely on the API exposed by Protean and Protean.Action to query and modify machine context.

Link to this section Summary

Link to this section Types

@type assigns() :: %{required(any()) => any()}
Link to this opaque

private_state()

View Source (opaque)
@opaque private_state()
@type t() :: %Protean.Context{
  assigns: assigns(),
  event: Protean.event() | nil,
  final: value(),
  private: private_state(),
  value: value()
}
@type value() :: MapSet.t(Protean.Node.id())

Link to this section Functions

Link to this function

matches?(context, descriptor)

View Source
@spec matches?(t(), Protean.Node.id() | String.t() | atom()) :: boolean()

See Protean.matches?/2.