decodeToEnum
inline fun <E : Enum<E>> Asn1Primitive.decodeToEnum(assertTag: Asn1Element.Tag = Asn1Element.Tag.ENUM): E(source)
decodes this Asn1Primitive's content into an enum Entry based on the decoded ordinal. assertTag defaults to Asn1Element.Tag.ENUM, but can be overridden (for implicitly tagged enums, for example).
Note that ASN.1 allows for negative ordinals and ordinals beyond 32 bit integers, exceeding Kotlin's enums!
Throws
on invalid input