encapsulate

fun <O> encapsulate(value: Any, callback: KSerializer<T>.(T) -> O): O?(source)