macro_rules! asn1_sequence {
(
seq $name:ident {
$(
$(#[$modifier:ident $(($modifier_arg:expr))?])? $field_name:ident : $field_combinator_type:ty = $field_combinator:expr
),*
$(,)?
}
) => { ... };
(
seq $name:ident {
$(
$(#[$modifier:ident $(($modifier_arg:expr))?])? $field_name:ident : $field_combinator_type:ty = $field_combinator:expr, spec $spec_field_combinator:expr
),*
$(,)?
}
) => { ... };
}
Expand description
Generate a combinator for an ASN.1 SEQUENCE (with default or optional fields)
For example
ⓘ
asn1_sequence! {
sequence Test {
typ: ASN1<ObjectIdentifier> = ASN1(ObjectIdentifier),
value: DirectoryString = DirectoryString,
}
}
NOTE: all sub-combinators have to be prefix secure (for Pair to work) NOTE: we have the restriction that an OrdChoice combinator cannot be following an optional or default field.