diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-03-31 11:11:18 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-03-31 11:53:06 +0200 |
commit | 945c2cbaf9c71ab02ebe04c943a27edfd2276a75 (patch) | |
tree | 489c38fbca21668a78e9b1d26b289e109bf72594 /openpgp/src/message/mod.rs | |
parent | 5e5e16bf2fbc64c8347abe93fa33dc573b254a76 (diff) |
openpgp: Move definition of struct Message.
Diffstat (limited to 'openpgp/src/message/mod.rs')
-rw-r--r-- | openpgp/src/message/mod.rs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/openpgp/src/message/mod.rs b/openpgp/src/message/mod.rs index 3a0c0624..5bb3f2e3 100644 --- a/openpgp/src/message/mod.rs +++ b/openpgp/src/message/mod.rs @@ -18,7 +18,6 @@ use crate::Result; use crate::Error; use crate::Packet; use crate::PacketPile; -use crate::Message; use crate::packet::Literal; use crate::packet::Tag; use crate::parse::Parse; @@ -307,6 +306,26 @@ impl MessageValidator { } } +// DOC-HACK: To avoid having a top-level re-export of `Cert`, we move +// it in a submodule `def`. +pub use def::Message; +mod def { +use super::*; +/// An OpenPGP message. +/// +/// An OpenPGP message is a structured sequence of OpenPGP packets. +/// Basically, it's an optionally encrypted, optionally signed literal +/// data packet. The exact structure is defined in [Section 11.3 of RFC +/// 4880]. +/// +/// [Section 11.3 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-11.3 +#[derive(PartialEq)] +pub struct Message { + /// A message is just a validated packet pile. + pub(super) pile: PacketPile, +} +} // doc-hack, see above + impl fmt::Debug for Message { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("Message") |