diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-04-21 09:26:56 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-04-21 12:23:27 +0200 |
commit | 91c3de5093f71004664c225d26a217f7814889ae (patch) | |
tree | 73453fcec211b35bb0274275dea26dba81b48f3d | |
parent | bc4e1564ea816a66d1191fc310ac6d2b02d1a92f (diff) |
openpgp: Add accessors for the inner writer to the armor::Writer.
-rw-r--r-- | openpgp/src/armor.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/openpgp/src/armor.rs b/openpgp/src/armor.rs index ef528cba..25c6a8bc 100644 --- a/openpgp/src/armor.rs +++ b/openpgp/src/armor.rs @@ -236,6 +236,16 @@ impl<W: Write> Writer<W> { Ok(w) } + /// Returns a reference to the inner writer. + pub fn get_ref(&self) -> &W { + &self.sink + } + + /// Returns a mutable reference to the inner writer. + pub fn get_mut(&mut self) -> &mut W { + &mut self.sink + } + fn finalize_headers(&mut self) -> Result<()> { if ! self.dirty { self.dirty = true; |