diff options
author | Neal H. Walfield <neal@pep.foundation> | 2023-05-15 12:35:50 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2023-05-15 13:13:01 +0200 |
commit | 22b215c16214f0a7a2776b61588ed7575f2ad383 (patch) | |
tree | 084f6612882de24bb5bb56e7b46c075512e20b36 /openpgp | |
parent | 013bbc3983d7eade008e9b5936f9d9d95aa75283 (diff) |
openpgp: Improve documentation.
- In `Cert::keys`, `Cert::userids` and `Cert::user_attributes`, we
that `ValidCert:userids`, etc. is better than `Cert::userids`, etc.,
mention that `Cert::with_policy` can be used to turn a `Cert` into a
`ValidCert`.
- Fixes #921.
Diffstat (limited to 'openpgp')
-rw-r--r-- | openpgp/src/cert.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/openpgp/src/cert.rs b/openpgp/src/cert.rs index fcb1e21c..819b9245 100644 --- a/openpgp/src/cert.rs +++ b/openpgp/src/cert.rs @@ -1062,7 +1062,8 @@ impl Cert { /// **Note:** This returns all User IDs, even those without a /// binding signature. This is not what you want, unless you are /// doing a low-level inspection of the certificate. Use - /// [`ValidCert::userids`] instead. + /// [`ValidCert::userids`] instead. (You turn a `Cert` into a + /// [`ValidCert`] by using [`Cert::with_policy`].) /// /// # Examples /// @@ -1096,7 +1097,8 @@ impl Cert { /// **Note:** This returns all User Attributes, even those without /// a binding signature. This is not what you want, unless you /// are doing a low-level inspection of the certificate. Use - /// [`ValidCert::user_attributes`] instead. + /// [`ValidCert::user_attributes`] instead. (You turn a `Cert` + /// into a [`ValidCert`] by using [`Cert::with_policy`].) /// /// # Examples /// @@ -1127,7 +1129,8 @@ impl Cert { /// **Note:** This returns all keys, even those without a binding /// signature. This is not what you want, unless you are doing a /// low-level inspection of the certificate. Use - /// [`ValidCert::keys`] instead. + /// [`ValidCert::keys`] instead. (You turn a `Cert` into a + /// [`ValidCert`] by using [`Cert::with_policy`].) /// /// By necessity, this function erases the returned keys' roles. /// If you are only interested in the primary key, use |