summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-02-05 17:54:28 +0100
committerJustus Winter <justus@sequoia-pgp.org>2020-02-05 17:54:28 +0100
commitc8eb94375a38e5606441a9e86d402442662ffb02 (patch)
tree82d7c2f012cc2df01b24857e84255e8ad1ef99e8
parent2293401cae5e9b4f32e97556700f64141995faaf (diff)
openpgp: Avoid rendering toplevel `Cert` as re-export.
-rw-r--r--openpgp/src/cert/mod.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/openpgp/src/cert/mod.rs b/openpgp/src/cert/mod.rs
index fdddb47d..852cf3c2 100644
--- a/openpgp/src/cert/mod.rs
+++ b/openpgp/src/cert/mod.rs
@@ -237,6 +237,11 @@ type UserAttributeBindings = ComponentBindings<UserAttribute>;
type UnknownBindings = ComponentBindings<Unknown>;
+// DOC-HACK: To avoid having a top-level re-export of `Cert`, we move
+// it in a submodule `def`.
+pub use def::Cert;
+mod def {
+use super::*;
/// A OpenPGP Certificate.
///
/// A Certificate (see [RFC 4880, section 11.1]) can be used to verify
@@ -373,18 +378,25 @@ type UnknownBindings = ComponentBindings<Unknown>;
/// ```
#[derive(Debug, Clone, PartialEq)]
pub struct Cert {
+ pub(super) // doc-hack, see above
primary: PrimaryKeyBinding<key::PublicParts>,
+ pub(super) // doc-hack, see above
userids: UserIDBindings,
+ pub(super) // doc-hack, see above
user_attributes: UserAttributeBindings,
+ pub(super) // doc-hack, see above
subkeys: SubkeyBindings<key::PublicParts>,
// Unknown components, e.g., some UserAttribute++ packet from the
// future.
+ pub(super) // doc-hack, see above
unknowns: UnknownBindings,
// Signatures that we couldn't find a place for.
+ pub(super) // doc-hack, see above
bad: Vec<packet::Signature>,
}
+} // doc-hack, see above
impl std::str::FromStr for Cert {
type Err = failure::Error;