elementDescriptors

Returns an iterable of all descriptor elements.

Example:

@Serializable
class User(val name: String, val alias: String?)

User.serializer().descriptor.elementDescriptors.toList() // Returns [PrimitiveDescriptor(kotlin.String), PrimitiveDescriptor(kotlin.String)?]