Levels

com.softinio.verdict4s.algebra.Levels
See theLevels companion class
object Levels

Building a Levels rubric: from strings at runtime, or derived from an enum with derives Levels.

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Levels.type

Members list

Type members

Types

The ordered level descriptions as they go on the wire.

The ordered level descriptions as they go on the wire.

The refinement carries the API's own limit of 2 to 10 levels; a Score with one level cannot discriminate and is rejected at construction.

Attributes

Value members

Concrete methods

inline def derived[A](using m: SumOf[A]): Levels[A]

Derive an ordered level set from a Scala 3 enum.

Derive an ordered level set from a Scala 3 enum.

enum Frustration derives Levels:
 case Calm, Frustrated, VeryAngry

Declaration order is rubric order, lowest first, and it is what the service's level indices refer to. Reordering the cases changes the meaning of every score already recorded, so treat that order as part of your data model rather than as cosmetic.

Attributes

Just the wire-level descriptions, for a Score whose answer is read as a number rather than mapped back to a level value.

Just the wire-level descriptions, for a Score whose answer is read as a number rather than mapped back to a level value.

Attributes

Levels described by plain text, in order from lowest to highest.

Levels described by plain text, in order from lowest to highest.

Attributes

Givens

Givens

given given_Eq_Levels[A]: Eq[Levels[A]]
given given_Show_Levels[A]: Show[Levels[A]]