Skip to content

Commit cde2991

Browse files
authored
doc(der_derive): Add documentation for field-level tag_mode attribute. (RustCrypto#1401)
1 parent 471c073 commit cde2991

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

der/derive/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@
101101
//! Note: please open a GitHub Issue if you would like to request support
102102
//! for additional ASN.1 types.
103103
//!
104+
//! ### `#[asn1(tag_mode = "...")]` attribute: `EXPLICIT` vs `IMPLICIT`
105+
//!
106+
//! This attribute can be used to declare the tagging mode used for a field of a `struct`
107+
//! which derives [`Sequence`] or for a variant of an `enum` which derives [`Choice`].
108+
//! It allows to override the toplevel `tag_mode` attribute, for the fields and variants that
109+
//! specify it.
110+
//!
104111
//! [`der`]: https://docs.rs/der/
105112
//! [`Choice`]: derive@Choice
106113
//! [`Sequence`]: derive@Sequence

0 commit comments

Comments
 (0)