Building an Options set: from strings at runtime, or derived from an enum with derives Options.
Attributes
Members list
Type members
Types
The rubric map as it goes on the wire.
The rubric map as it goes on the wire.
SortedMap so the encoded JSON is deterministic, which keeps the golden tests stable and identical on the JVM and on Node. The refinement carries the API's own limit of 1 to 255 options.
Attributes
Value members
Concrete methods
Derive an option set from a Scala 3 enum.
Derive an option set from a Scala 3 enum.
enum Dept derives Options:
case Billing, Technical, Sales
The case labels become the option names, in declaration order, and a Choice question built from this answers in Dept rather than in strings. Use describing when the names alone are not enough of a rubric.
Only enums whose cases are all singletons can be derived: a case with parameters has no single name to send.
Attributes
Derive from an enum, with rubric text for some or all of its cases.
Derive from an enum, with rubric text for some or all of its cases.
Attributes
An option set with no rubric text, for when the names speak for themselves.
An option set with no rubric text, for when the names speak for themselves.
Attributes
An option set whose names are only known at runtime.
An option set whose names are only known at runtime.
Value parameters
- entries
-
option name to rubric; a
Nonerubric is meaningful and is sent as an explicitnull