summaryrefslogtreecommitdiffstats
path: root/openpgp/src/cert
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/cert')
-rw-r--r--openpgp/src/cert/amalgamation/key.rs10
-rw-r--r--openpgp/src/cert/amalgamation/key/iter.rs8
-rw-r--r--openpgp/src/cert/parser/low_level/lexer.rs2
-rw-r--r--openpgp/src/cert/parser/low_level/mod.rs1
4 files changed, 21 insertions, 0 deletions
diff --git a/openpgp/src/cert/amalgamation/key.rs b/openpgp/src/cert/amalgamation/key.rs
index 7071829e..d3dc085f 100644
--- a/openpgp/src/cert/amalgamation/key.rs
+++ b/openpgp/src/cert/amalgamation/key.rs
@@ -449,6 +449,11 @@ pub struct KeyAmalgamation<'a, P, R, R2>
ca: ComponentAmalgamation<'a, Key<P, R>>,
primary: R2,
}
+assert_send_and_sync!(KeyAmalgamation<'_, P, R, R2>,
+ P: key::KeyParts,
+ R: key::KeyRole,
+ R2
+);
// derive(Clone) doesn't work with generic parameters that don't
// implement clone. But, we don't need to require that C implements
@@ -942,6 +947,11 @@ pub struct ValidKeyAmalgamation<'a, P, R, R2>
// The binding signature at time `time`. (This is just a cache.)
binding_signature: &'a Signature,
}
+assert_send_and_sync!(ValidKeyAmalgamation<'_, P, R, R2>,
+ P: key::KeyParts,
+ R: key::KeyRole,
+ R2: Copy
+);
/// A Valid primary Key, and its associated data.
///
diff --git a/openpgp/src/cert/amalgamation/key/iter.rs b/openpgp/src/cert/amalgamation/key/iter.rs
index a41673bd..45d3c618 100644
--- a/openpgp/src/cert/amalgamation/key/iter.rs
+++ b/openpgp/src/cert/amalgamation/key/iter.rs
@@ -82,6 +82,10 @@ pub struct KeyAmalgamationIter<'a, P, R>
_p: std::marker::PhantomData<P>,
_r: std::marker::PhantomData<R>,
}
+assert_send_and_sync!(KeyAmalgamationIter<'_, P, R>,
+ P: key::KeyParts,
+ R: key::KeyRole
+);
impl<'a, P, R> fmt::Debug for KeyAmalgamationIter<'a, P, R>
where P: key::KeyParts,
@@ -680,6 +684,10 @@ pub struct ValidKeyAmalgamationIter<'a, P, R>
_p: std::marker::PhantomData<P>,
_r: std::marker::PhantomData<R>,
}
+assert_send_and_sync!(ValidKeyAmalgamationIter<'_, P, R>,
+ P: key::KeyParts,
+ R: key::KeyRole
+);
impl<'a, P, R> fmt::Debug for ValidKeyAmalgamationIter<'a, P, R>
where P: key::KeyParts,
diff --git a/openpgp/src/cert/parser/low_level/lexer.rs b/openpgp/src/cert/parser/low_level/lexer.rs
index 27df8b6b..a8fad2e8 100644
--- a/openpgp/src/cert/parser/low_level/lexer.rs
+++ b/openpgp/src/cert/parser/low_level/lexer.rs
@@ -46,6 +46,7 @@ pub enum Token {
/// An `Unknown` packet.
Unknown(Tag, Option<Packet>),
}
+assert_send_and_sync!(Token);
/// Internal data-structure used by the parser.
///
@@ -58,6 +59,7 @@ pub enum Component {
UserAttributeBundle(UserAttributeBundle),
UnknownBundle(UnknownBundle),
}
+assert_send_and_sync!(Component);
impl<'a> From<&'a Token> for Tag {
fn from(token: &'a Token) -> Self {
diff --git a/openpgp/src/cert/parser/low_level/mod.rs b/openpgp/src/cert/parser/low_level/mod.rs
index a1cd2002..b89ce7bf 100644
--- a/openpgp/src/cert/parser/low_level/mod.rs
+++ b/openpgp/src/cert/parser/low_level/mod.rs
@@ -74,6 +74,7 @@ pub enum CertParserError {
/// An OpenPGP error.
OpenPGP(Error),
}
+assert_send_and_sync!(CertParserError);
impl From<CertParserError> for anyhow::Error {
fn from(err: CertParserError) -> Self {