Derive Macro rasn::AsnType [−][src]
#[derive(AsnType)] { // Attributes available to this derive: #[rasn] }
An automatic derive of the AsnType
trait.
This macro will automatically generate an implementation of AsnType
,
and generate a compile-time check that all of your fields (if struct) or
variants (if a choice style enum) have distinct tags.
Shared Attributes
These attributes are available on containers, variants, and fields.
tag([class], number)
— override the default tag with the one specified with this attribute. E.g.#[rasn(rag(context, 0))]
.
Container Attributes
crate_root
The path to therasn
library to use in the macro.enumerated/choice
Use either#[rasn(choice)]
or#[rasn(enumerated)]
to mark your enum as one of the two different enum types in ASN.1.