micro_utils.dokka
0.16.1
common
micro_utils.dokka
/
dev.inmo.micro_utils.serialization.encapsulator
/
Encapsulator
Encapsulator
data
class
Encapsulator
<
T
:
Any
>
(
val
klass
:
KClass
<
T
>
,
val
serializer
:
KSerializer
<
T
>
)
Constructors
Functions
Properties
Extensions
Constructors
Encapsulator
Link copied to clipboard
fun
<
T
:
Any
>
Encapsulator
(
klass
:
KClass
<
T
>
,
serializer
:
KSerializer
<
T
>
)
Functions
encapsulate
Link copied to clipboard
fun
<
O
>
encapsulate
(
value
:
Any
,
callback
:
KSerializer
<
T
>
.
(
T
)
->
O
)
:
O
?
Properties
klass
Link copied to clipboard
val
klass
:
KClass
<
T
>
serializer
Link copied to clipboard
val
serializer
:
KSerializer
<
T
>
Extensions
try
Encode
Link copied to clipboard
fun
<
T
:
Any
>
Encapsulator
<
T
>
.
tryEncode
(
encoder
:
Encoder
,
value
:
Any
)
:
Unit
?