api

http4k / org.http4k.lens / LensExtractor

LensExtractor

interface LensExtractor<in IN, out OUT> : (IN) -> OUT

Functions

Name Summary
extract Lens operation to get the value from the target. Synonym for invoke(IN)open fun extract(target: IN): OUT
get Lens operation to get the value from the target. Synonym for invoke(IN)open operator fun <R : IN> get(target: R): OUT
invoke Lens operation to get the value from the targetabstract operator fun invoke(target: IN): OUT
restrictFrom Restrict the type that this Lens can extract fromopen fun <NEXT : IN> restrictFrom(): LensExtractor<NEXT, 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>>

Inheritors

Name Summary
BodyLens A BodyLens provides the uni-directional extraction of an entity from a target body.open class BodyLens<out FINAL> : LensExtractor<HttpMessage, FINAL>
Lens A Lens provides the uni-directional extraction of an entity from a target.open class Lens<in IN : Any, out FINAL> : LensExtractor<IN, FINAL>, Iterable<Meta>
LensInjectorExtractor interface LensInjectorExtractor<IN, OUT> : LensExtractor<IN, OUT>, LensInjector<OUT, IN>
Store interface Store<OUT> : LensInjector<OUT, Request>, LensExtractor<Request, OUT>
WsMessageLens A WsMessageLens provides the extraction of an entity from a target WsMessage.open class WsMessageLens<out FINAL> : LensExtractor<WsMessage, FINAL>