summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-04-03 11:30:26 +0200
committerNeal H. Walfield <neal@pep.foundation>2020-04-03 11:34:05 +0200
commit9d8ae03e5f6b96ad602a3ebeed9286e067766e66 (patch)
treee91b8ecf0b007251bce13d26361572403aa148cb
parent01b0ea100da215bfdd67a857467b8ea3169a79a3 (diff)
openpgp: Rename Primary to PrimaryKey.
-rw-r--r--openpgp/src/cert/amalgamation.rs2
-rw-r--r--openpgp/src/cert/amalgamation/key.rs18
-rw-r--r--openpgp/src/cert/prelude.rs2
3 files changed, 11 insertions, 11 deletions
diff --git a/openpgp/src/cert/amalgamation.rs b/openpgp/src/cert/amalgamation.rs
index 2e2248a7..7f1f00b1 100644
--- a/openpgp/src/cert/amalgamation.rs
+++ b/openpgp/src/cert/amalgamation.rs
@@ -44,7 +44,7 @@ mod key;
pub use key::{
ErasedKeyAmalgamation,
KeyAmalgamation,
- Primary,
+ PrimaryKey,
PrimaryKeyAmalgamation,
SubordinateKeyAmalgamation,
ValidErasedKeyAmalgamation,
diff --git a/openpgp/src/cert/amalgamation/key.rs b/openpgp/src/cert/amalgamation/key.rs
index 7a43bf42..dc215688 100644
--- a/openpgp/src/cert/amalgamation/key.rs
+++ b/openpgp/src/cert/amalgamation/key.rs
@@ -67,7 +67,7 @@ use crate::{
/// Methods specific to key amalgamations.
// This trait exists primarily so that `ValidAmalgamation` can depend
// on it, and use it in its default implementations.
-pub trait Primary<'a, P, R>
+pub trait PrimaryKey<'a, P, R>
where P: 'a + key::KeyParts,
R: 'a + key::KeyRole,
{
@@ -236,7 +236,7 @@ impl<'a, P> ValidateAmalgamation<'a, Key<P, key::UnspecifiedRole>>
}
}
-impl<'a, P> Primary<'a, P, key::PrimaryRole>
+impl<'a, P> PrimaryKey<'a, P, key::PrimaryRole>
for PrimaryKeyAmalgamation<'a, P>
where P: 'a + key::KeyParts
{
@@ -245,7 +245,7 @@ impl<'a, P> Primary<'a, P, key::PrimaryRole>
}
}
-impl<'a, P> Primary<'a, P, key::SubordinateRole>
+impl<'a, P> PrimaryKey<'a, P, key::SubordinateRole>
for SubordinateKeyAmalgamation<'a, P>
where P: 'a + key::KeyParts
{
@@ -254,7 +254,7 @@ impl<'a, P> Primary<'a, P, key::SubordinateRole>
}
}
-impl<'a, P> Primary<'a, P, key::UnspecifiedRole>
+impl<'a, P> PrimaryKey<'a, P, key::UnspecifiedRole>
for ErasedKeyAmalgamation<'a, P>
where P: 'a + key::KeyParts
{
@@ -672,7 +672,7 @@ impl<'a, P, R, R2> ValidAmalgamation<'a, Key<P, R>>
where P: 'a + key::KeyParts,
R: 'a + key::KeyRole,
R2: Copy,
- Self: Primary<'a, P, R>,
+ Self: PrimaryKey<'a, P, R>,
{
fn cert(&self) -> &ValidCert<'a> {
assert!(std::ptr::eq(self.ka.cert(), self.cert.cert()));
@@ -714,7 +714,7 @@ impl<'a, P, R, R2> ValidAmalgamation<'a, Key<P, R>>
}
-impl<'a, P> Primary<'a, P, key::PrimaryRole>
+impl<'a, P> PrimaryKey<'a, P, key::PrimaryRole>
for ValidPrimaryKeyAmalgamation<'a, P>
where P: 'a + key::KeyParts
{
@@ -723,7 +723,7 @@ impl<'a, P> Primary<'a, P, key::PrimaryRole>
}
}
-impl<'a, P> Primary<'a, P, key::SubordinateRole>
+impl<'a, P> PrimaryKey<'a, P, key::SubordinateRole>
for ValidSubordinateKeyAmalgamation<'a, P>
where P: 'a + key::KeyParts
{
@@ -732,7 +732,7 @@ impl<'a, P> Primary<'a, P, key::SubordinateRole>
}
}
-impl<'a, P> Primary<'a, P, key::UnspecifiedRole>
+impl<'a, P> PrimaryKey<'a, P, key::UnspecifiedRole>
for ValidErasedKeyAmalgamation<'a, P>
where P: 'a + key::KeyParts
{
@@ -789,7 +789,7 @@ impl<'a, P, R, R2> ValidKeyAmalgamation<'a, P, R, R2>
where P: 'a + key::KeyParts,
R: 'a + key::KeyRole,
R2: Copy,
- Self: Primary<'a, P, R>,
+ Self: PrimaryKey<'a, P, R>,
{
/// Sets the key to expire in delta seconds.
///
diff --git a/openpgp/src/cert/prelude.rs b/openpgp/src/cert/prelude.rs
index d2f3498b..fdb71436 100644
--- a/openpgp/src/cert/prelude.rs
+++ b/openpgp/src/cert/prelude.rs
@@ -32,7 +32,7 @@ pub use crate::cert::{
amalgamation::ErasedKeyAmalgamation,
amalgamation::KeyAmalgamation,
amalgamation::KeyAmalgamationIter,
- amalgamation::Primary as _,
+ amalgamation::PrimaryKey as _,
amalgamation::PrimaryKeyAmalgamation,
amalgamation::SubordinateKeyAmalgamation,
amalgamation::ValidAmalgamation as _,