subtype

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

Registers one tag-discriminated subtype.

Throws

if leading tags cannot be inferred for empty leadingTags


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