diff options
Diffstat (limited to 'openpgp/src/serialize/stream.rs')
-rw-r--r-- | openpgp/src/serialize/stream.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openpgp/src/serialize/stream.rs b/openpgp/src/serialize/stream.rs index ec605c0a..93809b7b 100644 --- a/openpgp/src/serialize/stream.rs +++ b/openpgp/src/serialize/stream.rs @@ -65,6 +65,13 @@ pub fn wrap<'a, W: 'a + io::Write>(w: W) -> writer::Stack<'a, Cookie> { } +impl<'a> From<&'a mut io::Write> for writer::Stack<'a, Cookie> { + fn from(w: &'a mut io::Write) -> Self { + writer::Generic::new(w, Cookie::new(0)) + } +} + + /// Writes an arbitrary packet. /// /// This writer can be used to construct arbitrary OpenPGP packets. |