Discriminator
zio.blocks.schema.binding.Discriminator
A Discriminator tells which case of a sum type a value belongs to: it is half of a Binding.Variant. It returns the index of the case in the order of the variant node's cases, and the Matcher at that index of the variant's Matchers downcasts the value to that case.
Type parameters
- A
-
the sum type
Attributes
- Source
- Discriminator.scala
- Graph
-
- Supertypes
Members list
In this article