Skip to content

Latest commit

 

History

History
58 lines (28 loc) · 1.41 KB

File metadata and controls

58 lines (28 loc) · 1.41 KB

Ash.TypedStruct

typed_struct

Describe the fields of the struct

Nested DSLs

typed_struct.field

field name, type

A field on the struct

Arguments

Name Type Default Docs
name{: #typed_struct-field-name .spark-required} atom The name of the struct field
type{: #typed_struct-field-type .spark-required} module The type of the struct field

Options

Name Type Default Docs
default{: #typed_struct-field-default } any the default value for the field
description{: #typed_struct-field-description } any a 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? } boolean true Whether 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>