BiDiBodyLensSpec

open class BiDiBodyLensSpec<OUT>(metas: List<Meta>, contentType: ContentType, get: LensGet<HttpMessage, OUT>, set: LensSet<HttpMessage, OUT>) : BodyLensSpec<OUT>

Represents a bi-directional extraction of an entity from a target Body, or an insertion into a target Body.

Constructors

Link copied to clipboard
constructor(metas: List<Meta>, contentType: ContentType, get: LensGet<HttpMessage, OUT>, set: LensSet<HttpMessage, OUT>)

Functions

Link copied to clipboard
fun <NEXT> map(nextIn: (OUT) -> NEXT, nextOut: (NEXT) -> OUT): BiDiBodyLensSpec<NEXT>

Create another BiDiBodyLensSpec which applies the bi-directional transformations to the result. Any resultant Lens can be used to extract or insert the final type from/into a Body.

fun <NEXT> map(nextIn: (OUT) -> NEXT): BodyLensSpec<NEXT>

Create another BodyLensSpec which applies the uni-directional transformation to the result. Any resultant Lens can only be used to extract the final type from a Body.

Link copied to clipboard
open override fun toLens(): BiDiBodyLens<OUT>

Create a lens for this Spec