summaryrefslogtreecommitdiffstats
path: root/openpgp/src/packet/header
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-05-20 13:20:59 +0200
committerNeal H. Walfield <neal@pep.foundation>2020-05-20 13:20:59 +0200
commitdb15fab0b50a5a0bd570632a89c2761861258a65 (patch)
tree30996eadb4ce96b51f8e33eee0d2a7be432a8710 /openpgp/src/packet/header
parentd73b750daa0a3eada2e42154ccd6fbc553ead55e (diff)
openpgp: Make field private, provide an accessor
- Don't export `CTBOld::length_type`. Provide a getter, `CTBOld::length_type`, instead.
Diffstat (limited to 'openpgp/src/packet/header')
-rw-r--r--openpgp/src/packet/header/ctb.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/openpgp/src/packet/header/ctb.rs b/openpgp/src/packet/header/ctb.rs
index b6cbd457..073798f5 100644
--- a/openpgp/src/packet/header/ctb.rs
+++ b/openpgp/src/packet/header/ctb.rs
@@ -110,7 +110,7 @@ pub struct CTBOld {
/// Common CTB fields.
common: CTBCommon,
/// Type of length specifier.
- pub length_type: PacketLengthType,
+ length_type: PacketLengthType,
}
impl CTBOld {
@@ -163,6 +163,11 @@ impl CTBOld {
pub fn tag(&self) -> Tag {
self.common.tag
}
+
+ /// Returns the packet's length type.
+ pub fn length_type(&self) -> PacketLengthType {
+ self.length_type
+ }
}
/// A sum type for the different CTB variants.