Represents a resolved type in the API specification.
Named type modules (Ash.Type.Enum implementations and Ash.Type.NewType subtypes)
are referenced via kind: :type_ref inline, with their full definitions in
%Ash.Info.Manifest{}.types. This prevents circular references and mirrors how resources
are referenced via kind: :resource with definitions in %Ash.Info.Manifest{}.resources.
Primitive types (string, integer, etc.) and anonymous containers (map/keyword/tuple without a named module) are still resolved inline.
Summary
Functions
Returns the effective module for a type — instance_of if set, otherwise module.
Returns the effective resource module for a type.
Finds a sub-field by name from the type's field descriptors.
Finds the type of a sub-field by name.
Finds a union member by name from the type's members.
Returns the list of field descriptors for a type.
Returns true if the type has nested field descriptors (.fields or .element_types).
Returns true if the type represents a resource (:resource or :embedded_resource).
Types
@type kind() ::
:string
| :integer
| :boolean
| :float
| :decimal
| :uuid
| :date
| :datetime
| :utc_datetime
| :utc_datetime_usec
| :naive_datetime
| :time
| :time_usec
| :duration
| :binary
| :atom
| :ci_string
| :term
| :enum
| :union
| :resource
| :embedded_resource
| :map
| :struct
| :array
| :tuple
| :keyword
| :type_ref
| :any
| :unknown
@type t() :: %Ash.Info.Manifest.Type{ allow_nil?: boolean() | nil, constraints: keyword() | nil, custom: map(), element_types: [%{name: atom(), type: t(), allow_nil?: boolean()}] | nil, fields: [%{name: atom(), type: t(), allow_nil?: boolean()}] | nil, instance_of: atom() | nil, item_type: t() | nil, kind: kind(), members: [%{name: atom(), type: t()}] | nil, module: atom() | nil, name: String.t(), resource_module: atom() | nil, values: [atom()] | nil }
Functions
Returns the effective module for a type — instance_of if set, otherwise module.
For struct types wrapping a module (NewTypes, TypedStructs), instance_of points
to the original module. For other types, module is the Ash type module.
Returns the effective resource module for a type.
For resource/embedded_resource types, returns resource_module.
Falls back to effective_module/1.
Finds a sub-field by name from the type's field descriptors.
Returns the field map (%{name, type, allow_nil?}) or nil if not found.
Finds the type of a sub-field by name.
Returns the %Ash.Info.Manifest.Type{} of the field, or nil if not found.
Finds a union member by name from the type's members.
Returns the member map (%{name, type, tag, tag_value}) or nil.
Returns the list of field descriptors for a type.
Checks .fields first (for map/struct/keyword), then .element_types (for tuple).
Returns an empty list if neither is populated.
Each field is a map with :name, :type (%Ash.Info.Manifest.Type{}), and :allow_nil?.
Returns true if the type has nested field descriptors (.fields or .element_types).
Returns true if the type represents a resource (:resource or :embedded_resource).