summaryrefslogtreecommitdiffstats
path: root/openpgp/src/packet/seip.rs
AgeCommit message (Collapse)Author
2021-09-30Allow new() without default()Lars Wirzenius
It is customary in Rust to implement the Default trait for types that can have a new method that takes no arguments. However, that's not always wanted. I've marked all the structures that have a new without arguments but don't implement Default, so that if we get more of them, clippy will warn. Found by clippy lint new_without_default: https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
2020-12-08openpgp: Use parens for assert_send_and_sync!.Azul
2020-12-08openpgp: Ensure public types are Send and Sync.Azul
- See #627.
2020-03-27openpgp: Improve documentation.Justus Winter
2020-03-27openpgp: Define equality using the serialized OpenPGP form.Justus Winter
- 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.
2020-03-26openpgp: Change packet bodies to be tristate.Justus Winter
- Packet bodies can now be either unprocessed (e.g. compressed, encrypted), processed (e.g. uncompressed, decrypted), or structured (e.g. parsed into packets). - Make the container types deref to Container, and container deref to packet bodies. - This cleanly avoids the confusion when serializing containers: We can serialize compressed data packets with either body, but we can only serialize encryption containers with unprocessed bodies. - Fixes #187.
2020-03-26openpgp: Drop trivial tests.Justus Winter
2020-01-08openpgp: Explicitly implement PartialEq, Hash for packets.Justus Winter
- We explicitly exclude the common fields. - See #92.
2020-01-07openpgp: Do not Deref to Common for the container types.Justus Winter
- This was only implemented for the container types because previously, the container logic was implemented in Common. That is no longer the case and explicit forwarders for the Container type are added.
2019-12-20openpgp: Fix comparing streamed containers.Justus Winter
- Compute a digest over the streamed data and use it to implement equality. - Fixes #93.
2019-12-20openpgp: Keep track whether a container has been streamed.Justus Winter
- If a container was streamed, we can no longer compare it to other packets. Keep track of that, and use it in Container::PartialEq. - See #93.
2019-12-20openpgp: Make Container::body just a Vec.Justus Winter
- Vec::with_capacity(0) is guaranteed not to allocate, and the Option encodes no other information. This simplifies code a lot.
2019-12-20openpgp: Embed struct Container in the container packets.Justus Winter
- This allows us to implement PartialEq and related traits more selectively. See #93.
2019-07-15Prepare for Rust 2018.Justus Winter
- This is the result of running `cargo fix --edition`, with some manual adjustments. - The vast majority of changes merely qualify module paths with 'crate::'. - Two instances of adding an anonymous pattern to a trait's function. - `async` is a keyword in Rust 2018, and hence it needs to be escaped (e.g. in the case of the net::r#async module). - The manual adjustments were needed due to various shortcomings of the analysis employed by `cargo fix`, e.g. unexpanded macros, procedural macros, lalrpop grammars.
2019-03-26openpgp: Add enum SEIP.Justus Winter
- See #228.
2019-02-06openpgp: New public constructor SEIP::new.Justus Winter
- See #173.
2019-02-06openpgp: Rename consuming conversion functions.Justus Winter
- Rename functions that consume their receiver but are called .to_...() to .into_...(). - For the packet types, simply drop the conversion function in favor of using the From trait. - Fixes #160.
2018-12-13openpgp: Make fields of SEIP private.Justus Winter
2018-10-16openpgp: Refactor.Justus Winter
- Move the modules containing the packet types to the openpgp::packet module, aligning the layout of the files with the exposed API.