Encapsulator

data class Encapsulator<T : Any>(val klass: KClass<T>, val serializer: KSerializer<T>)

Constructors

Link copied to clipboard
constructor(klass: KClass<T>, serializer: KSerializer<T>)

Functions

Link copied to clipboard
fun <O> encapsulate(value: Any, callback: KSerializer<T>.(T) -> O): O?
Link copied to clipboard
fun <T : Any> Encapsulator<T>.tryEncode(encoder: Encoder, value: Any): Unit?

Properties

Link copied to clipboard
val klass: KClass<T>
Link copied to clipboard
val serializer: KSerializer<T>