unsafeTransformTarget
inline fun <Source : Any, Target : Any, Target2 : Any> Codec<Source, Target>.unsafeTransformTarget(crossinline from: (Target2) -> Target, crossinline to: (Target) -> Target2): Codec<Source, Target2>(source)
Adapts a codec to a different target type while keeping the original source type.
Decoding first converts the incoming Target2 value into the receiver's Target with from. Encoding delegates to the receiver, then maps the encoded value into Target2 with to.
The transformation is unsafe because neither mapping is validated or wrapped; exceptions from from or to escape to the caller.