(discriminator: StringAdd).self
(discriminator: StringFormat).self
(discriminator: ArrowAssoc[Discriminator[X, Y, D]]).x
(Since version 2.10.0) Use leftOfArrow
instead
(discriminator: Ensuring[Discriminator[X, Y, D]]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
Wrapper class that discriminates type
Y
in context of typeX
with a value of typeD
.For example, consider a sealed trait and its subclasses. Each subclass could be assigned an integer by defining a
Discriminator[Parent, Subclass, Int]
for each.context in which type
Y
is discriminated from other typestype that is differentiated from other types by values of
D
value type that discriminates values of
Y
from other types in context ofX