api

http4k / org.http4k.jsonrpc / Mapping

Mapping

class Mapping<IN : Any, OUT> : Lens<IN, OUT>

Constructors

Name Summary
<init> Mapping(convert: (IN) -> OUT)

Extension Functions

Name Summary
asResult Convert the result of a lens extraction to a Result4k type whichfun <IN, OUT> LensExtractor<IN, OUT>.asResult(): LensExtractor<IN, Result<OUT, LensFailure>>
matches Check the content of any lens on a request for routing purposes.fun <T> Lens<Request, T>.matches(fn: (T) -> Boolean): Router