1 /*
2  * Copyright 2017-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3  */
4 package kotlinx.serialization.internal
5 
6 import kotlinx.serialization.descriptors.*
7 
8 /**
9  * Internal interface used as a marker for [SerialDescriptor] in order
10  * to retrieve the set of all element names without allocations.
11  * Used by our implementations as a performance optimization.
12  * It's not an instance of [SerialDescriptor] to simplify implementation via delegation
13  */
14 internal interface CachedNames {
15 
16     /**
17      * A set of all names retrieved from [SerialDescriptor.getElementName]
18      */
19     public val serialNames: Set<String>
20 }
21