Top Level Namespace
Defined in:
Macro Summary
-
config_value(*fields)
Declares a config value type from a single field list.
Macro Detail
macro config_value(*fields)
#
Declares a config value type from a single field list.
One declaration produces the getters, the YAML mapping, and the ordinary Crystal initializer, so adding a setting is one line rather than an edit in three parallel places. String fields get the lenient scalar converters automatically: every string in this schema is a user-facing name, alias, or path, where YAML's type inference is unhelpful.
Defined at the top level for the same reason record is: it is called from
inside the type body it describes.