Pair

case class Pair[T, U, TU](left: EndpointIO[T], right: EndpointIO[U], combine: CombineParams, split: SplitParams) extends EndpointIO[TU] with Pair[TU]
trait Serializable
trait Product
trait Equals
trait Pair[TU]
trait EndpointIO[TU]
trait EndpointOutput[TU]
trait EndpointInput[TU]
class Object
trait Matchable
class Any

Value members

Concrete methods

override def map[V](m: Mapping[TU, V]): EndpointIO[V]
Definition Classes

Inherited methods

def /[U, TU](other: EndpointInput[U])(implicit concat: Aux[TU, U, TU]): EndpointInput[TU]
Inherited from:
EndpointInput
def and[J, IJ](other: EndpointIO[J])(implicit concat: Aux[TU, J, IJ]): EndpointIO[IJ]
Inherited from:
EndpointIO
def and[J, IJ](other: EndpointOutput[J])(implicit concat: Aux[TU, J, IJ]): EndpointOutput[IJ]
Inherited from:
EndpointOutput
def and[U, TU](other: EndpointInput[U])(implicit concat: Aux[TU, U, TU]): EndpointInput[TU]
Inherited from:
EndpointInput
def map[U](f: TU => U)(g: U => TU): ThisType[U]
Inherited from:
EndpointTransput
def mapDecode[U](f: TU => DecodeResult[U])(g: U => TU): ThisType[U]
Inherited from:
EndpointTransput
inline def mapTo[CASE_CLASS <: Product](using mc: ProductOf[CASE_CLASS]): ThisType[CASE_CLASS]
Inherited from:
EndpointTransputMacros
def mapValidate[U](v: Validator[TU])(f: TU => U)(g: U => TU): ThisType[U]

Adds the given validator, and maps to the given higher-level type U.

Adds the given validator, and maps to the given higher-level type U.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create inputs/outputs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

See also:
Inherited from:
EndpointTransput
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product
override def show: String
Definition Classes
Inherited from:
Pair
def validate(v: Validator[TU]): ThisType[T]

Adds a validator.

Adds a validator.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

See also:
Inherited from:
EndpointTransput