summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJustus Winter <justus@pep-project.org>2017-11-22 14:46:30 +0100
committerJustus Winter <justus@pep-project.org>2017-11-22 14:48:43 +0100
commit5b72f710d3b65c2f04dcb84e4b489f55ac012096 (patch)
treed6b4e083fb18d4dcc2c512184e5e690b14a44620 /src
parent8c7f933be470ea4af2ff53a23a8f15065a2c1a98 (diff)
Add an destructive iterator.
- Implement IntoIter that deconstucts the message objects and moves packages out of it.
Diffstat (limited to 'src')
-rw-r--r--src/openpgp/openpgp.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/openpgp/openpgp.rs b/src/openpgp/openpgp.rs
index f813f80a..221c0850 100644
--- a/src/openpgp/openpgp.rs
+++ b/src/openpgp/openpgp.rs
@@ -417,6 +417,10 @@ impl Message {
grandchildren: None,
};
}
+
+ pub fn into_iter(self) -> std::vec::IntoIter<Packet> {
+ self.packets.into_iter()
+ }
}
impl Packet {