Question
Constructors for every question type, and the combinators that change how an answer is read.
Every constructor returns a validated Question[A]: it never throws, and problems accumulate rather than stopping at the first. A is what the answer decodes to -- NoulAnswer, ChoiceAnswer[D] for an option type D, or ScoreAnswer -- and map or emap turn it into a type of your own.
Attributes
- Graph
-
- Supertypes
- Self type
-
Question.type
Members list
Type members
Classlikes
A validated question paired with its answer decoder.
A validated question paired with its answer decoder.
Attributes
- Supertypes
Value members
Concrete methods
Pick one option from a set, answering in the caller's own type.
Pick one option from a set, answering in the caller's own type.
Attributes
Pick one option, deriving the set from an enum on the spot.
Pick one option, deriving the set from an enum on the spot.
Equivalent to choice[A] with a derived Options, for an enum that does not carry a derives Options clause.
Attributes
Pick one option from a set whose names are only known at runtime.
Pick one option from a set whose names are only known at runtime.
Attributes
A question that is already known to be invalid. Mostly useful in tests.
A question that is already known to be invalid. Mostly useful in tests.
Attributes
A yes/no question.
A yes/no question.
Attributes
A yes/no question that says what a yes and a no mean.
A yes/no question that says what a yes and a no mean.
Attributes
A yes/no question built from structured instructions.
A yes/no question built from structured instructions.
Attributes
Send a question shape this release does not model.
Send a question shape this release does not model.
Forward compatibility: if the service grows a fourth question type, this lets you use it immediately rather than wait for a library version.
Attributes
Rate against ordered levels, lowest first.
Rate against ordered levels, lowest first.
Attributes
Rate against levels derived from an enum on the spot.
Rate against levels derived from an enum on the spot.
Attributes
Extensions
Extensions
Post-process the answer, with the option to reject it.
Post-process the answer, with the option to reject it.
Use this when your type cannot represent every answer the service might give — a failure surfaces as a Verdict4sError, exactly as a malformed response would.
Attributes
Post-process the answer into your own type.
Post-process the answer into your own type.
The wire request is untouched; only the way the answer is read changes.
Attributes
The question as it will be sent, if it is valid.
The question as it will be sent, if it is valid.
Attributes
Collapse accumulated failures into one raisable error.
Collapse accumulated failures into one raisable error.
Attributes
The accumulated validation result.
The accumulated validation result.