Function Decoder.readUnionIndex

Reads the tag of a union written by [Encoder.writeIndex].

abstract ulong readUnionIndex (
  const(Schema) unionSchema
) @safe;

Throws

AvroTypeException If this is a stateful reader and union is not the type of the next value to be read