implicit classFrom[L <: HList, A, M <: HList] extends AnyRef
Builds a Codec[M] using the supplied function M => A. The returned codec uses the original
Codec[L] for encoding and decoding. When encoding, it computes an A value using the supplied
function and inserts the computed A in to the HList M, yielding an HList L. That HList L
is then encoded using the original codec.
Builds a
Codec[M]
using the supplied functionM => A
. The returned codec uses the originalCodec[L]
for encoding and decoding. When encoding, it computes anA
value using the supplied function and inserts the computedA
in to theHList M
, yielding anHList L
. ThatHList L
is then encoded using the original codec.