# Encapsulator

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

## Constructors

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

## Properties

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

## Functions

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