sealed trait EndpointTransput[T] extends EndpointTransputMacros[T]
A transput is EITHER an input, or an output (see: https://ell.stackexchange.com/questions/21405/hypernym-for-input-and-output). The transput traits contain common functionality, shared by all inputs and outputs.
Note that implementations of EndpointIO
can be used *both* as inputs and outputs.
The hierarchy is as follows:
/---> `EndpointInput` >---\ `EndpointTransput` >--- ---> `EndpointIO` \---> `EndpointOutput` >---/
Inputs and outputs additionally form another hierarchy:
/--> `Single` >--> `Basic` >--> `Atom` `EndpointInput` / `EndpointOutput` >-- \--> `Pair`
where the intuition behind the traits is:
single
: represents a single value, as opposed to a pair (tuple); a pair, but transformed using.map
is also a single valuebasic
: corresponds to an input/output which is encoded/decoded in one step; alwayssingle
atom
: corresponds to a single component of a request or response. Such inputs/outputs contain a Codec and Info meta-data, and are alwaysbasic
- Alphabetic
- By Inheritance
- EndpointTransput
- EndpointTransputMacros
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map[U](f: (T) => U)(g: (U) => T): ThisType[U]
- def mapDecode[U](f: (T) => DecodeResult[U])(g: (U) => T): ThisType[U]
- macro def mapTo[CASE_CLASS]: ThisType[CASE_CLASS]
- Definition Classes
- EndpointTransputMacros
- def mapValidate[U](v: Validator[T])(f: (T) => U)(g: (U) => T): 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 thef
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
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def validate(v: Validator[T]): 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
.map
s or.mapDecode
s will be invoked before validation.- See also
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated