unaryPlus

context(der: Der, treeBuilder: Asn1TreeBuilder)
inline operator fun <Serializable> Serializable.unaryPlus()(source)

Encodes this value with its inferred serializer and appends it to the current Asn1TreeBuilder.

Both a Der context and an Asn1TreeBuilder context are required, which allows concise use such as with(DER) { Asn1.Sequence { +value } }. Types supported directly by the core builder, including WrappedElement and WrappedEncodable, do not require a Der context.

Throws

SerializationException

if serialization constraints are violated