zio.blocks.schema.binding.Binding.Variant
See theVariant companion object
final case class Variant[A](discriminator: Discriminator[A], matchers: Matchers[A]) extends Binding[Variant, A]
The binding of a variant node, such as a sealed trait or an enum. discriminator returns the index of the case that a value belongs to, and matchers holds one Matcher per case. Both follow the order of the node's cases: case i of the node is matched by matchers(i), and its values are discriminated as i.
Attributes
- Companion
- object
- Source
- Binding.scala
- Graph
-
- Supertypes
Members list
In this article