Asn1OpenPolymorphismByTagBuilder

DSL builder for tag-discriminated open polymorphism.

Each registered subtype must contribute at least one leading tag (explicitly or inferable).

Functions

Link copied to clipboard
inline fun <S : T> subtype(vararg leadingTags: Asn1Element.Tag, noinline matches: (T) -> Boolean = { it is S })

fun <S : T> subtype(serializer: KSerializer<S>, leadingTags: Set<Asn1Element.Tag>, matches: (T) -> Boolean)

Registers one tag-discriminated subtype.