Ash.TypedStruct

View Source

typed_struct

Describe the fields of the struct

Nested DSLs

typed_struct.field

field name, type

A field on the struct

Arguments

NameTypeDefaultDocs
nameatomThe name of the struct field
typemoduleThe type of the struct field

Options

NameTypeDefaultDocs
defaultanythe default value for the field
descriptionanya description for the field
constraintsany[]Constraints to provide to the type when casting the value. For more, see Ash.Type.
allow_nil?booleantrueWhether or not the field can be set to nil.

Introspection

Target: Ash.TypedStruct.Field