From b4920e732c360fd6a4ad7ff6639129bbb67bf355 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Fri, 27 Nov 2020 14:27:45 +0100 Subject: openpgp: Mention the Cert::retain_userids and friends. --- openpgp/src/cert.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/openpgp/src/cert.rs b/openpgp/src/cert.rs index 5090a4e6..29782b44 100644 --- a/openpgp/src/cert.rs +++ b/openpgp/src/cert.rs @@ -589,8 +589,16 @@ use super::*; /// /// # Filtering Certificates /// -/// To filter certificates, iterate over all components, clone what -/// you want to keep, and then reassemble the certificate. The +/// Component-wise filtering of userids, user attributes, and subkeys +/// can be done with [`Cert::retain_userids`], +/// [`Cert::retain_user_attributes`], and [`Cert::retain_subkeys`]. +/// +/// [`Cert::retain_userids`]: #method.retain_userids +/// [`Cert::retain_user_attributes`]: #method.retain_user_attributes +/// [`Cert::retain_subkeys`]: #method.retain_subkeys +/// +/// If you need even more control, iterate over all components, clone +/// what you want to keep, and then reassemble the certificate. The /// following example simply copies all the packets, and can be /// adapted to suit your policy: /// -- cgit v1.2.3