Encapsulator

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

Constructors

Link copied to clipboard
fun <T : Any> Encapsulator(klass: KClass<T>, serializer: <ERROR CLASS><T>)

Functions

Link copied to clipboard
fun <O> encapsulate(value: Any, callback: <ERROR CLASS><T>.(T) -> O): O?

Properties

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

Extensions

tryEncode
Link copied to clipboard
fun <T : Any> Encapsulator<T>.tryEncode(encoder: <ERROR CLASS>, value: Any): <ERROR CLASS>
fun <T : Any> Encapsulator<T>.tryEncode(encoder: <ERROR CLASS>, value: Any): <ERROR CLASS>
fun <T : Any> Encapsulator<T>.tryEncode(encoder: <ERROR CLASS>, value: Any): <ERROR CLASS>