summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2018-06-27 11:22:15 +0200
committerJustus Winter <justus@sequoia-pgp.org>2018-06-28 17:41:50 +0200
commit20a60e1a922a482d42a41034087ce7c6e20228f9 (patch)
treeeb8c9cb2771efc5f1fb5148a5fd61c88681cb2b4
parentca370ca0ae70f9b0ca547a48bbb3b153c3a37bfd (diff)
openpgp: Add accessors for subpacket::NotationData.
-rw-r--r--openpgp/src/subpacket.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/openpgp/src/subpacket.rs b/openpgp/src/subpacket.rs
index 92f92a0b..a90f759a 100644
--- a/openpgp/src/subpacket.rs
+++ b/openpgp/src/subpacket.rs
@@ -435,6 +435,23 @@ pub struct NotationData<'a> {
value: &'a [u8],
}
+impl<'a> NotationData<'a> {
+ /// Returns the flags.
+ pub fn flags(&self) -> u32 {
+ self.flags
+ }
+
+ /// Returns the name.
+ pub fn name(&self) -> &'a [u8] {
+ self.name
+ }
+
+ /// Returns the value.
+ pub fn value(&self) -> &'a [u8] {
+ self.value
+ }
+}
+
/// Struct holding an arbitrary subpacket.
///
/// The value is well structured. See `SubpacketTag` for a