diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-03-27 13:59:06 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-03-27 14:08:22 +0100 |
commit | a3f64c655c9e212f79fbbb425fac58f1ee6ce5a9 (patch) | |
tree | 8d8e0d72390cd2beee010cb799e8297d246d85fb /openpgp/src/packet/unknown.rs | |
parent | 20a8c5a9b191112af4d9db974d51922c57217882 (diff) |
openpgp: Define equality using the serialized OpenPGP form.
- All packets should be considered equal if the serialized OpenPGP
form is equal, modulo framing (i.e. CTB type, packet length
encoding, partial body chunking).
- In cases this may lead to surprising outcomes, discuss this in the
documentation, and provide additional equality predicates.
- Fixes #92.
Diffstat (limited to 'openpgp/src/packet/unknown.rs')
-rw-r--r-- | openpgp/src/packet/unknown.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openpgp/src/packet/unknown.rs b/openpgp/src/packet/unknown.rs index c2e9a5f3..4cd876ee 100644 --- a/openpgp/src/packet/unknown.rs +++ b/openpgp/src/packet/unknown.rs @@ -11,6 +11,11 @@ use crate::Packet; /// how to process rather than abort. /// /// This packet effectively holds a binary blob. +/// +/// # A note on equality +/// +/// Two `Unknown` packets are considered equal if their tag and their +/// body is equal. #[derive(Debug)] pub struct Unknown { /// CTB packet header fields. |