summaryrefslogtreecommitdiffstats
path: root/openpgp
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-08-19 14:58:33 +0200
committerNeal H. Walfield <neal@pep.foundation>2020-08-19 14:58:33 +0200
commit9b453e6c74feb612173a6bb623271e4398662dc4 (patch)
treef47d6aa3b67392e362c9fe46bf4f52b684cb757a /openpgp
parentb97c768ffe545a328338202c2c74bfd49c9eaad5 (diff)
openpgp: Improve SignatureFields' documentation.
- See #470.
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/src/packet/signature/mod.rs18
1 files changed, 14 insertions, 4 deletions
diff --git a/openpgp/src/packet/signature/mod.rs b/openpgp/src/packet/signature/mod.rs
index 36c0a068..2ee978b9 100644
--- a/openpgp/src/packet/signature/mod.rs
+++ b/openpgp/src/packet/signature/mod.rs
@@ -62,10 +62,17 @@ pub mod subpacket;
/// The data stored in a `Signature` packet.
///
/// This data structure contains exactly those fields that appear in a
-/// `Signature` packet. It is used by both `Signature4` and
-/// `SignatureBuilder`, which include auxiliary information. This
-/// data structure is public so that `Signature4` and
-/// `SignatureBuilder` can deref to it.
+/// [`Signature` packet]. It is used by both the [`Signature4`] and
+/// the [`SignatureBuilder`] data structures, which include other
+/// auxiliary information. This data structure is public so that
+/// `Signature4` and `SignatureBuilder` can deref to it.
+///
+/// A `SignatureField` derefs to a [`SubpacketAreas`].
+///
+/// [`Signature`]: https://tools.ietf.org/html/rfc4880#section-5.2
+/// [`Signature4`]: struct.Signature4.html
+/// [`SignatureBuilder`]: struct.SignatureBuilder.html
+/// [`SubpacketAreas`]: subpacket/struct.SubpacketAreas.html
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct SignatureFields {
/// Version of the signature packet. Must be 4.
@@ -119,6 +126,9 @@ impl SignatureFields {
}
/// Gets the signature type.
+ ///
+ /// This function is called `typ` and not `type`, because `type`
+ /// is a reserved word.
pub fn typ(&self) -> SignatureType {
self.typ
}