decodeAs
inline fun <T> decodeAs(requireFullConsumption: Boolean = true, decoder: Asn1Structure.Iterator.() -> T): T(source)
Decodes the content of this ASN.1 structure using the provided decoder lambda. This function gives a convenient way to decode ASN.1 structures by exposing an iterator over the structure's children to the decoder lambda. Optionally, it enforces that all children must be consumed. Use decodeRethrowing to automatically and consistently wrap exceptions thrown during decoding in Asn1Exceptions.