summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2018-06-06 13:19:50 +0200
committerNeal H. Walfield <neal@pep.foundation>2018-06-13 11:15:23 +0200
commit99d0dbe486e0fdd1e1b9cf266f93a726abcf2444 (patch)
tree659e3fa2c60b7f255ff212b5f0ced01c61720ac5 /examples
parent07080242c572234f06ddd617a2dc328948bd6571 (diff)
openpgp: Rename Message to PacketPile
- RFC 4880 defines an OpenPGP message to be a sequence of packets with a particular structure (Section 11.3; https://tools.ietf.org/html/rfc4880#section-11.3). Since there is no term for an unstructured sequence of packets, we invent one.
Diffstat (limited to 'examples')
-rw-r--r--examples/guide-exploring-openpgp.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/guide-exploring-openpgp.rs b/examples/guide-exploring-openpgp.rs
index bc05a7e1..a2bd1517 100644
--- a/examples/guide-exploring-openpgp.rs
+++ b/examples/guide-exploring-openpgp.rs
@@ -38,10 +38,10 @@ fn main() {
);
// Parse message.
- let message = openpgp::Message::from_reader(&mut reader).unwrap();
+ let pile = openpgp::PacketPile::from_reader(&mut reader).unwrap();
// Iterate over children.
- for (i, p) in message.children().enumerate() {
+ for (i, p) in pile.children().enumerate() {
println!("{}: {:?}", i, p);
}
@@ -49,7 +49,7 @@ fn main() {
println!();
// Parse into TPK.
- let tpk = openpgp::TPK::from_message(message).unwrap();
+ let tpk = openpgp::TPK::from_packet_pile(pile).unwrap();
println!("Fingerprint: {}", tpk.fingerprint());
// List userids.