diff options
Diffstat (limited to 'openpgp/src/serialize')
4 files changed, 9 insertions, 0 deletions
diff --git a/openpgp/src/serialize/stream/partial_body.rs b/openpgp/src/serialize/stream/partial_body.rs index 52752fcb..cc9afa89 100644 --- a/openpgp/src/serialize/stream/partial_body.rs +++ b/openpgp/src/serialize/stream/partial_body.rs @@ -45,6 +45,7 @@ pub struct PartialBodyFilter<'a, C: 'a> { // The number of bytes written to this filter. position: u64, } +assert_send_and_sync!(PartialBodyFilter<'_, C>, C); const PARTIAL_BODY_FILTER_MAX_CHUNK_SIZE : usize = 1 << 30; diff --git a/openpgp/src/serialize/stream/writer/mod.rs b/openpgp/src/serialize/stream/writer/mod.rs index e1453f56..c2f9f518 100644 --- a/openpgp/src/serialize/stream/writer/mod.rs +++ b/openpgp/src/serialize/stream/writer/mod.rs @@ -189,6 +189,7 @@ pub struct Identity<'a, C> { inner: Option<BoxStack<'a, C>>, cookie: C, } +assert_send_and_sync!(Identity<'_, C>, C); impl<'a> Identity<'a, Cookie> { /// Makes an identity writer. @@ -269,6 +270,7 @@ pub struct Generic<W: io::Write + Send + Sync, C> { cookie: C, position: u64, } +assert_send_and_sync!(Generic<W, C>, W: io::Write, C); impl<'a, W: 'a + io::Write + Send + Sync> Generic<W, Cookie> { /// Wraps an `io::Write`r. @@ -353,6 +355,7 @@ impl<'a, W: io::Write + Send + Sync, C> Stackable<'a, C> for Generic<W, C> { pub struct Armorer<'a, C: 'a> { inner: Generic<armor::Writer<BoxStack<'a, C>>, C>, } +assert_send_and_sync!(Armorer<'_, C>, C); impl<'a> Armorer<'a, Cookie> { /// Makes an armoring writer. @@ -425,6 +428,7 @@ impl<'a, C: 'a> Stackable<'a, C> for Armorer<'a, C> { pub struct Encryptor<'a, C: 'a> { inner: Generic<symmetric::Encryptor<Box<dyn Stackable<'a, C> + Send + Sync + 'a>>, C>, } +assert_send_and_sync!(Encryptor<'_, C>, C); impl<'a> Encryptor<'a, Cookie> { /// Makes an encrypting writer. @@ -496,6 +500,7 @@ impl<'a, C: 'a> Stackable<'a, C> for Encryptor<'a, C> { pub struct AEADEncryptor<'a, C: 'a> { inner: Generic<aead::Encryptor<BoxStack<'a, C>>, C>, } +assert_send_and_sync!(AEADEncryptor<'_, C>, C); impl<'a> AEADEncryptor<'a, Cookie> { /// Makes an encrypting writer. diff --git a/openpgp/src/serialize/stream/writer/writer_bzip2.rs b/openpgp/src/serialize/stream/writer/writer_bzip2.rs index a13ad61f..b38d8f7e 100644 --- a/openpgp/src/serialize/stream/writer/writer_bzip2.rs +++ b/openpgp/src/serialize/stream/writer/writer_bzip2.rs @@ -10,6 +10,7 @@ use super::{Generic, Message, BoxStack, Stackable, Cookie}; pub struct BZ<'a, C: 'a> { inner: Generic<BzEncoder<BoxStack<'a, C>>, C>, } +assert_send_and_sync!(BZ<'_, C>, C); impl<'a> BZ<'a, Cookie> { /// Makes a BZ compressing writer. diff --git a/openpgp/src/serialize/stream/writer/writer_deflate.rs b/openpgp/src/serialize/stream/writer/writer_deflate.rs index 92226302..27b4bd6b 100644 --- a/openpgp/src/serialize/stream/writer/writer_deflate.rs +++ b/openpgp/src/serialize/stream/writer/writer_deflate.rs @@ -10,6 +10,7 @@ use super::{Generic, Message, BoxStack, Stackable, Cookie}; pub struct ZIP<'a, C: 'a> { inner: Generic<DeflateEncoder<BoxStack<'a, C>>, C>, } +assert_send_and_sync!(ZIP<'_, C>, C); impl<'a> ZIP<'a, Cookie> { /// Makes a ZIP compressing writer. @@ -78,6 +79,7 @@ impl<'a, C: 'a> Stackable<'a, C> for ZIP<'a, C> { pub struct ZLIB<'a, C: 'a> { inner: Generic<ZlibEncoder<BoxStack<'a, C>>, C>, } +assert_send_and_sync!(ZLIB<'_, C>, C); impl<'a> ZLIB<'a, Cookie> { /// Makes a ZLIB compressing writer. |