[][src]Derive Macro der::Message

#[derive(Message)]
{
    // Attributes available to this derive:
    #[asn1]
}
This is supported on crate feature derive only.

Derive the Message trait.

This custom derive macro can be used to automatically impl the Message trait for any struct representing a message which is encoded as an ASN.1 SEQUENCE.

#[asn1(type = "...")] attribute

Placing this attribute on fields of a struct makes it possible to decode types which don't directly implement the Decode and Encode traits but do impl TryInto and From for one of the ASN.1 types listed below:

  • bit-string: performs an intermediate conversion to der::BitString
  • octet-string: performs an intermediate conversion to der::OctetString

Note: please open a GitHub Issue if you would like to request support for additional ASN.1 types.