Back to Ash

Ash.TypedStruct

documentation/dsls/DSL-Ash.TypedStruct.md

3.24.61.4 KB
Original Source
<!-- This file was generated by Spark. Do not edit it by hand. -->

Ash.TypedStruct

typed_struct

Describe the fields of the struct

Nested DSLs

typed_struct.field

elixir
field name, type

A field on the struct

Arguments

NameTypeDefaultDocs
name{: #typed_struct-field-name .spark-required}atomThe name of the struct field
type{: #typed_struct-field-type .spark-required}moduleThe type of the struct field

Options

NameTypeDefaultDocs
default{: #typed_struct-field-default }anythe default value for the field
description{: #typed_struct-field-description }anya description for the field
constraints{: #typed_struct-field-constraints }any[]Constraints to provide to the type when casting the value. For more, see Ash.Type.
allow_nil?{: #typed_struct-field-allow_nil? }booleantrueWhether or not the field can be set to nil.

Introspection

Target: Ash.TypedStruct.Field

<style type="text/css">.spark-required::after { content: "*"; color: red !important; }</style>