OneOfVariant

case class OneOfVariant[O]

Specifies one possible output.

When encoding to a response, this output is used if:

  1. appliesTo applied to the output value (as returned by the server logic) returns true.
  2. when a fixed content type specified by the output matches the request's Accept header

When decoding from a response, this output is used if it decodes successfully.

The appliesTo function should determine, whether a runtime value matches the type O. This check cannot be in general done by checking the run-time class of the value, due to type erasure (if O has type parameters).

trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product