exchema v0.4.0 Exchema.Types.Struct
Represents a specific struct with some field constraints.
Normally you won’t use this type directly but will instead
define your struct using Exchema.Struct
.
Say that you have a struct Data
with a field value
.
If you want to make sure the value is an integer, you can represent it with
{Exchema.Types.Struct,
{Data, [
value: Exchema.Types.Integer
]}
}
If you don’t care about the field values, you can represent it with {Exchema.Types.Struct, Data}.