View Source Avrogen.Avro.Types.Union (avrogen v0.7.1)
This type is a representation of the Avro union type.
(Note that when a default value is specified for a record field whose type is a union, the type of the default value must match the first element of the union. Thus, for unions containing "null", the "null" is usually listed first, since the default value of such unions is typically null.)
Unions may not contain more than one schema with the same type, except for the named types record, fixed and enum. For example, unions containing two array types or two map types are not permitted, but two types with different names are permitted. (Names permit efficient resolution when reading and writing unions.)
Unions may not immediately contain other unions.
Summary
Types
@type t() :: %Avrogen.Avro.Types.Union{types: [Avrogen.Avro.Schema.non_union()] | nil}