summaryrefslogtreecommitdiffstats
path: root/openpgp/src
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-12-19 17:27:31 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-12-20 18:04:56 +0100
commitcfdc2c0a51ca5bcb30683d37b3983c6589799a20 (patch)
tree65d776a73460b96a549e2b92ea9bc911493cf291 /openpgp/src
parent2e8de96be54a219965d5f8245f77ef76fd27dd14 (diff)
openpgp: Add forwarding accessors for the packet's children.
Diffstat (limited to 'openpgp/src')
-rw-r--r--openpgp/src/packet/container.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/openpgp/src/packet/container.rs b/openpgp/src/packet/container.rs
index 91a7f76e..68138240 100644
--- a/openpgp/src/packet/container.rs
+++ b/openpgp/src/packet/container.rs
@@ -220,6 +220,16 @@ macro_rules! impl_container_forwards {
&mut self.container
}
+ /// Returns a reference to this Packet's children.
+ pub fn children_ref(&self) -> &[Packet] {
+ self.container.children_ref()
+ }
+
+ /// Returns a mutable reference to this Packet's children.
+ pub fn children_mut(&mut self) -> &mut Vec<Packet> {
+ self.container.children_mut()
+ }
+
/// Gets a reference to the this packet's body.
pub fn body(&self) -> Option<&[u8]> {
self.container.body()