pub struct KeyAmalgamation<'a, P, R, R2>{ /* private fields */ }Expand description
A key, and its associated data, and useful methods.
A KeyAmalgamation is like a ComponentAmalgamation, but
specialized for keys. Due to the requirement to keep track of the
key’s role when it is erased (see the module’s documentation for
more details), this is a different data structure rather than a
specialized type alias.
Generally, you won’t use this type directly, but instead use
PrimaryKeyAmalgamation, SubordinateKeyAmalgamation, or
ErasedKeyAmalgamation.
A KeyAmalgamation is returned by Cert::primary_key, and
Cert::keys.
KeyAmalgamation implements ValidateAmalgamation, which
allows you to turn a KeyAmalgamation into a
ValidKeyAmalgamation using KeyAmalgamation::with_policy.
§Examples
Iterating over all keys:
for ka in cert.keys() {
let ka: ErasedKeyAmalgamation<_> = ka;
}Getting the primary key:
let ka: PrimaryKeyAmalgamation<_> = cert.primary_key();Iterating over just the subkeys:
// We can skip the primary key (it's always first):
for ka in cert.keys().skip(1) {
let ka: ErasedKeyAmalgamation<_> = ka;
}
// Or use `subkeys`, which returns a more accurate type:
for ka in cert.keys().subkeys() {
let ka: SubordinateKeyAmalgamation<_> = ka;
}Implementations§
Source§impl<'a, P> KeyAmalgamation<'a, P, PrimaryRole, ()>where
P: KeyParts,
impl<'a, P> KeyAmalgamation<'a, P, PrimaryRole, ()>where
P: KeyParts,
Sourcepub fn parts_into_public(self) -> PrimaryKeyAmalgamation<'a, PublicParts>
pub fn parts_into_public(self) -> PrimaryKeyAmalgamation<'a, PublicParts>
Changes the key’s parts tag to PublicParts.
Sourcepub fn parts_as_public(&'a self) -> &'a PrimaryKeyAmalgamation<'a, PublicParts>
pub fn parts_as_public(&'a self) -> &'a PrimaryKeyAmalgamation<'a, PublicParts>
Changes the key’s parts tag to PublicParts.
Sourcepub fn parts_as_public_mut(
&'a mut self,
) -> &'a mut PrimaryKeyAmalgamation<'a, PublicParts>
pub fn parts_as_public_mut( &'a mut self, ) -> &'a mut PrimaryKeyAmalgamation<'a, PublicParts>
Changes the key’s parts tag to PublicParts.
Sourcepub fn parts_into_secret(
self,
) -> Result<PrimaryKeyAmalgamation<'a, SecretParts>>
pub fn parts_into_secret( self, ) -> Result<PrimaryKeyAmalgamation<'a, SecretParts>>
Changes the key’s parts tag to SecretParts.
Sourcepub fn parts_as_secret(
&'a self,
) -> Result<&'a PrimaryKeyAmalgamation<'a, SecretParts>>
pub fn parts_as_secret( &'a self, ) -> Result<&'a PrimaryKeyAmalgamation<'a, SecretParts>>
Changes the key’s parts tag to SecretParts.
Sourcepub fn parts_as_secret_mut(
&'a mut self,
) -> Result<&'a mut PrimaryKeyAmalgamation<'a, SecretParts>>
pub fn parts_as_secret_mut( &'a mut self, ) -> Result<&'a mut PrimaryKeyAmalgamation<'a, SecretParts>>
Changes the key’s parts tag to SecretParts.
Sourcepub fn parts_into_unspecified(
self,
) -> PrimaryKeyAmalgamation<'a, UnspecifiedParts>
pub fn parts_into_unspecified( self, ) -> PrimaryKeyAmalgamation<'a, UnspecifiedParts>
Changes the key’s parts tag to UnspecifiedParts.
Sourcepub fn parts_as_unspecified(
&'a self,
) -> &'a PrimaryKeyAmalgamation<'a, UnspecifiedParts>
pub fn parts_as_unspecified( &'a self, ) -> &'a PrimaryKeyAmalgamation<'a, UnspecifiedParts>
Changes the key’s parts tag to UnspecifiedParts.
Sourcepub fn parts_as_unspecified_mut(
&'a mut self,
) -> &'a mut PrimaryKeyAmalgamation<'a, UnspecifiedParts>
pub fn parts_as_unspecified_mut( &'a mut self, ) -> &'a mut PrimaryKeyAmalgamation<'a, UnspecifiedParts>
Changes the key’s parts tag to UnspecifiedParts.
Source§impl<'a, P> KeyAmalgamation<'a, P, SubordinateRole, ()>where
P: KeyParts,
impl<'a, P> KeyAmalgamation<'a, P, SubordinateRole, ()>where
P: KeyParts,
Sourcepub fn parts_into_public(self) -> SubordinateKeyAmalgamation<'a, PublicParts>
pub fn parts_into_public(self) -> SubordinateKeyAmalgamation<'a, PublicParts>
Changes the key’s parts tag to PublicParts.
Sourcepub fn parts_as_public(
&'a self,
) -> &'a SubordinateKeyAmalgamation<'a, PublicParts>
pub fn parts_as_public( &'a self, ) -> &'a SubordinateKeyAmalgamation<'a, PublicParts>
Changes the key’s parts tag to PublicParts.
Sourcepub fn parts_as_public_mut(
&'a mut self,
) -> &'a mut SubordinateKeyAmalgamation<'a, PublicParts>
pub fn parts_as_public_mut( &'a mut self, ) -> &'a mut SubordinateKeyAmalgamation<'a, PublicParts>
Changes the key’s parts tag to PublicParts.
Sourcepub fn parts_into_secret(
self,
) -> Result<SubordinateKeyAmalgamation<'a, SecretParts>>
pub fn parts_into_secret( self, ) -> Result<SubordinateKeyAmalgamation<'a, SecretParts>>
Changes the key’s parts tag to SecretParts.
Sourcepub fn parts_as_secret(
&'a self,
) -> Result<&'a SubordinateKeyAmalgamation<'a, SecretParts>>
pub fn parts_as_secret( &'a self, ) -> Result<&'a SubordinateKeyAmalgamation<'a, SecretParts>>
Changes the key’s parts tag to SecretParts.
Sourcepub fn parts_as_secret_mut(
&'a mut self,
) -> Result<&'a mut SubordinateKeyAmalgamation<'a, SecretParts>>
pub fn parts_as_secret_mut( &'a mut self, ) -> Result<&'a mut SubordinateKeyAmalgamation<'a, SecretParts>>
Changes the key’s parts tag to SecretParts.
Sourcepub fn parts_into_unspecified(
self,
) -> SubordinateKeyAmalgamation<'a, UnspecifiedParts>
pub fn parts_into_unspecified( self, ) -> SubordinateKeyAmalgamation<'a, UnspecifiedParts>
Changes the key’s parts tag to UnspecifiedParts.
Sourcepub fn parts_as_unspecified(
&'a self,
) -> &'a SubordinateKeyAmalgamation<'a, UnspecifiedParts>
pub fn parts_as_unspecified( &'a self, ) -> &'a SubordinateKeyAmalgamation<'a, UnspecifiedParts>
Changes the key’s parts tag to UnspecifiedParts.
Sourcepub fn parts_as_unspecified_mut(
&'a mut self,
) -> &'a mut SubordinateKeyAmalgamation<'a, UnspecifiedParts>
pub fn parts_as_unspecified_mut( &'a mut self, ) -> &'a mut SubordinateKeyAmalgamation<'a, UnspecifiedParts>
Changes the key’s parts tag to UnspecifiedParts.
Source§impl<'a, P> KeyAmalgamation<'a, P, UnspecifiedRole, bool>where
P: KeyParts,
impl<'a, P> KeyAmalgamation<'a, P, UnspecifiedRole, bool>where
P: KeyParts,
Sourcepub fn parts_into_public(self) -> ErasedKeyAmalgamation<'a, PublicParts>
pub fn parts_into_public(self) -> ErasedKeyAmalgamation<'a, PublicParts>
Changes the key’s parts tag to PublicParts.
Sourcepub fn parts_as_public(&'a self) -> &'a ErasedKeyAmalgamation<'a, PublicParts>
pub fn parts_as_public(&'a self) -> &'a ErasedKeyAmalgamation<'a, PublicParts>
Changes the key’s parts tag to PublicParts.
Sourcepub fn parts_as_public_mut(
&'a mut self,
) -> &'a mut ErasedKeyAmalgamation<'a, PublicParts>
pub fn parts_as_public_mut( &'a mut self, ) -> &'a mut ErasedKeyAmalgamation<'a, PublicParts>
Changes the key’s parts tag to PublicParts.
Sourcepub fn parts_into_secret(self) -> Result<ErasedKeyAmalgamation<'a, SecretParts>>
pub fn parts_into_secret(self) -> Result<ErasedKeyAmalgamation<'a, SecretParts>>
Changes the key’s parts tag to SecretParts.
Sourcepub fn parts_as_secret(
&'a self,
) -> Result<&'a ErasedKeyAmalgamation<'a, SecretParts>>
pub fn parts_as_secret( &'a self, ) -> Result<&'a ErasedKeyAmalgamation<'a, SecretParts>>
Changes the key’s parts tag to SecretParts.
Sourcepub fn parts_as_secret_mut(
&'a mut self,
) -> Result<&'a mut ErasedKeyAmalgamation<'a, SecretParts>>
pub fn parts_as_secret_mut( &'a mut self, ) -> Result<&'a mut ErasedKeyAmalgamation<'a, SecretParts>>
Changes the key’s parts tag to SecretParts.
Sourcepub fn parts_into_unspecified(
self,
) -> ErasedKeyAmalgamation<'a, UnspecifiedParts>
pub fn parts_into_unspecified( self, ) -> ErasedKeyAmalgamation<'a, UnspecifiedParts>
Changes the key’s parts tag to UnspecifiedParts.
Sourcepub fn parts_as_unspecified(
&'a self,
) -> &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>
pub fn parts_as_unspecified( &'a self, ) -> &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>
Changes the key’s parts tag to UnspecifiedParts.
Sourcepub fn parts_as_unspecified_mut(
&'a mut self,
) -> &'a mut ErasedKeyAmalgamation<'a, UnspecifiedParts>
pub fn parts_as_unspecified_mut( &'a mut self, ) -> &'a mut ErasedKeyAmalgamation<'a, UnspecifiedParts>
Changes the key’s parts tag to UnspecifiedParts.
Source§impl<'a, P> KeyAmalgamation<'a, P, SubordinateRole, ()>where
P: KeyParts,
impl<'a, P> KeyAmalgamation<'a, P, SubordinateRole, ()>where
P: KeyParts,
Sourcepub fn revocation_status<T>(
&self,
policy: &dyn Policy,
t: T,
) -> RevocationStatus<'_>
pub fn revocation_status<T>( &self, policy: &dyn Policy, t: T, ) -> RevocationStatus<'_>
Returns the subkey’s revocation status at time t.
A subkey is revoked at time t if:
-
There is a live revocation at time
tthat is newer than all live self signatures at timet, or -
There is a hard revocation (even if it is not live at time
t, and even if there is a newer self-signature).
Note: Certs and subkeys have different criteria from User IDs and User Attributes.
Note: this only returns whether this subkey is revoked; it does not imply anything about the Cert or other components.
§Examples
use openpgp::policy::StandardPolicy;
let p = &StandardPolicy::new();
// Display the subkeys' revocation status.
for ka in cert.keys().subkeys() {
eprintln!(" Revocation status of {}: {:?}",
ka.key().fingerprint(), ka.revocation_status(p, None));
}Source§impl<'a, P> KeyAmalgamation<'a, P, PrimaryRole, ()>where
P: KeyParts,
impl<'a, P> KeyAmalgamation<'a, P, PrimaryRole, ()>where
P: KeyParts,
Sourcepub fn binding_signature<T>(
&self,
policy: &dyn Policy,
time: T,
) -> Result<&'a Signature>
pub fn binding_signature<T>( &self, policy: &dyn Policy, time: T, ) -> Result<&'a Signature>
Returns the active binding signature at time t.
The active binding signature is the most recent, non-revoked
self-signature that is valid according to the policy and
alive at time t (creation time <= t, t < expiry). If
there are multiple such signatures then the signatures are
ordered by their MPIs interpreted as byte strings.
§Examples
use openpgp::policy::StandardPolicy;
let p = &StandardPolicy::new();
// Display information about the primary key's current active
// binding signature (the `time` parameter is `None`), if any.
eprintln!("{:?}", cert.primary_key().binding_signature(p, None));Source§impl<'a, P: 'a + KeyParts> KeyAmalgamation<'a, P, SubordinateRole, ()>
impl<'a, P: 'a + KeyParts> KeyAmalgamation<'a, P, SubordinateRole, ()>
Sourcepub fn binding_signature<T>(
&self,
policy: &dyn Policy,
time: T,
) -> Result<&'a Signature>
pub fn binding_signature<T>( &self, policy: &dyn Policy, time: T, ) -> Result<&'a Signature>
Returns the active binding signature at time t.
The active binding signature is the most recent, non-revoked
self-signature that is valid according to the policy and
alive at time t (creation time <= t, t < expiry). If
there are multiple such signatures then the signatures are
ordered by their MPIs interpreted as byte strings.
§Examples
use openpgp::policy::StandardPolicy;
let p = &StandardPolicy::new();
// Display information about each keys' current active
// binding signature (the `time` parameter is `None`), if any.
for k in cert.keys().subkeys() {
eprintln!("{:?}", k.binding_signature(p, None));
}Source§impl<'a, P, R, R2> KeyAmalgamation<'a, P, R, R2>
impl<'a, P, R, R2> KeyAmalgamation<'a, P, R, R2>
Sourcepub fn cert(&self) -> &'a Cert
pub fn cert(&self) -> &'a Cert
Returns the component’s associated certificate.
for k in cert.keys() {
// It's not only an identical `Cert`, it's the same one.
assert!(std::ptr::eq(k.cert(), &cert));
}Sourcepub fn bundle(&self) -> &'a ComponentBundle<Key<P, R>>
pub fn bundle(&self) -> &'a ComponentBundle<Key<P, R>>
Returns this amalgamation’s bundle.
Sourcepub fn component(&self) -> &'a Key<P, R>
pub fn component(&self) -> &'a Key<P, R>
Returns this amalgamation’s component.
§Examples
// Display some information about any unknown components.
for k in cert.keys() {
eprintln!(" - {:?}", k.component());
}Sourcepub fn self_signatures(
&self,
) -> impl Iterator<Item = &'a Signature> + Send + Sync
pub fn self_signatures( &self, ) -> impl Iterator<Item = &'a Signature> + Send + Sync
Returns the component’s self-signatures.
The signatures are validated, and they are sorted by their creation time, most recent first.
§Examples
for (i, ka) in cert.keys().enumerate() {
eprintln!("Key #{} ({}) has {:?} self signatures",
i, ka.key().fingerprint(),
ka.self_signatures().count());
}Sourcepub fn certifications(
&self,
) -> impl Iterator<Item = &'a Signature> + Send + Sync
pub fn certifications( &self, ) -> impl Iterator<Item = &'a Signature> + Send + Sync
Returns the component’s third-party certifications.
The signatures are not validated. They are sorted by their creation time, most recent first.
§Examples
for k in cert.keys() {
eprintln!("Key {} has {:?} unverified, third-party certifications",
k.key().fingerprint(),
k.certifications().count());
}Sourcepub fn self_revocations(
&self,
) -> impl Iterator<Item = &'a Signature> + Send + Sync
pub fn self_revocations( &self, ) -> impl Iterator<Item = &'a Signature> + Send + Sync
Returns the component’s revocations that were issued by the certificate holder.
The revocations are validated, and they are sorted by their creation time, most recent first.
§Examples
use openpgp::policy::StandardPolicy;
let p = &StandardPolicy::new();
for k in cert.keys() {
eprintln!("Key {} has {:?} revocation certificates.",
k.key().fingerprint(),
k.self_revocations().count());
}Sourcepub fn other_revocations(
&self,
) -> impl Iterator<Item = &'a Signature> + Send + Sync
pub fn other_revocations( &self, ) -> impl Iterator<Item = &'a Signature> + Send + Sync
Returns the component’s revocations that were issued by other certificates.
The revocations are not validated. They are sorted by their creation time, most recent first.
§Examples
use openpgp::policy::StandardPolicy;
let p = &StandardPolicy::new();
for k in cert.keys() {
eprintln!("Key {} has {:?} unverified, third-party revocation certificates.",
k.key().fingerprint(),
k.other_revocations().count());
}Sourcepub fn signatures(&self) -> impl Iterator<Item = &'a Signature> + Send + Sync
pub fn signatures(&self) -> impl Iterator<Item = &'a Signature> + Send + Sync
Returns all of the component’s signatures.
Only the self-signatures are validated. The signatures are sorted first by type, then by creation time. The self revocations come first, then the self signatures, then any certification approval key signatures, certifications, and third-party revocations coming last. This function may return additional types of signatures that could be associated to this component.
§Examples
use openpgp::policy::StandardPolicy;
let p = &StandardPolicy::new();
for (i, ka) in cert.keys().enumerate() {
eprintln!("Key #{} ({}) has {:?} signatures",
i, ka.key().fingerprint(),
ka.signatures().count());
}Source§impl<'a, P, R, R2> KeyAmalgamation<'a, P, R, R2>
impl<'a, P, R, R2> KeyAmalgamation<'a, P, R, R2>
Sourcepub fn valid_certifications_by_key<T, PK>(
&self,
policy: &'a dyn Policy,
reference_time: T,
issuer: PK,
) -> impl Iterator<Item = &Signature> + Send + Sync
pub fn valid_certifications_by_key<T, PK>( &self, policy: &'a dyn Policy, reference_time: T, issuer: PK, ) -> impl Iterator<Item = &Signature> + Send + Sync
Returns the third-party certifications issued by the specified key, and valid at the specified time.
This function returns the certifications issued by the specified key. Specifically, it returns a certification if:
- it is well-formed,
- it is live with respect to the reference time,
- it conforms to the policy, and
- the signature is cryptographically valid.
This method is implemented on a KeyAmalgamation and not
a ValidKeyAmalgamation, because a third-party
certification does not require the key to be self-signed.
§Examples
Alice has certified that a certificate belongs to Bob on two
occasions. Whereas
KeyAmalgamation::valid_certifications_by_key returns
both certifications,
KeyAmalgamation::active_certifications_by_key only
returns the most recent certification.
use sequoia_openpgp as openpgp;
use openpgp::cert::prelude::*;
use openpgp::policy::StandardPolicy;
const P: &StandardPolicy = &StandardPolicy::new();
let alice: Cert = // ...
let bob: Cert = // ...
let bob_pk = bob.primary_key();
let valid_certifications = bob_pk.valid_certifications_by_key(
P, None, alice.primary_key().key());
// Alice certified Bob's certificate twice.
assert_eq!(valid_certifications.count(), 2);
let active_certifications = bob_pk.active_certifications_by_key(
P, None, alice.primary_key().key());
// But only the most recent one is active.
assert_eq!(active_certifications.count(), 1);Sourcepub fn active_certifications_by_key<T, PK>(
&self,
policy: &'a dyn Policy,
reference_time: T,
issuer: PK,
) -> impl Iterator<Item = &Signature> + Send + Sync
pub fn active_certifications_by_key<T, PK>( &self, policy: &'a dyn Policy, reference_time: T, issuer: PK, ) -> impl Iterator<Item = &Signature> + Send + Sync
Returns any active third-party certifications issued by the specified key.
This function is like
KeyAmalgamation::valid_certifications_by_key, but it
only returns active certifications. Active certifications are
the most recent valid certifications with respect to the
reference time.
Although there is normally only a single active certification, there can be multiple certifications with the same timestamp. In this case, all of them are returned.
Unlike self-signatures, multiple third-party certifications issued by the same key at the same time can be sensible. For instance, Alice may fully trust a CA for user IDs in a particular domain, and partially trust it for everything else. This can only be expressed using multiple certifications.
This method is implemented on a KeyAmalgamation and not
a ValidKeyAmalgamation, because a third-party
certification does not require the user ID to be self-signed.
§Examples
See the examples for
KeyAmalgamation::valid_certifications_by_key.
Sourcepub fn valid_third_party_revocations_by_key<T, PK>(
&self,
policy: &'a dyn Policy,
reference_time: T,
issuer: PK,
) -> impl Iterator<Item = &Signature> + Send + Sync
pub fn valid_third_party_revocations_by_key<T, PK>( &self, policy: &'a dyn Policy, reference_time: T, issuer: PK, ) -> impl Iterator<Item = &Signature> + Send + Sync
Returns the third-party revocations issued by the specified key, and valid at the specified time.
This function returns the revocations issued by the specified key. Specifically, it returns a revocation if:
- it is well-formed,
- it is a hard revocation, or it is live with respect to the reference time,
- it conforms to the policy, and
- the signature is cryptographically valid.
This method is implemented on a KeyAmalgamation and not
a ValidKeyAmalgamation, because a third-party
revocation does not require the key to be self-signed.
§Examples
Alice revoked Bob’s certificate.
use sequoia_openpgp as openpgp;
use openpgp::cert::prelude::*;
use openpgp::policy::StandardPolicy;
const P: &StandardPolicy = &StandardPolicy::new();
let alice: Cert = // ...
let bob: Cert = // ...
let ka = bob.primary_key();
let revs = ka.valid_third_party_revocations_by_key(
P, None, alice.primary_key().key());
// Alice revoked Bob's certificate.
assert_eq!(revs.count(), 1);Trait Implementations§
Source§impl<'a, P, R, R2> Clone for KeyAmalgamation<'a, P, R, R2>
impl<'a, P, R, R2> Clone for KeyAmalgamation<'a, P, R, R2>
Source§impl<'a, P, R, R2: Debug> Debug for KeyAmalgamation<'a, P, R, R2>
impl<'a, P, R, R2: Debug> Debug for KeyAmalgamation<'a, P, R, R2>
Source§impl<'a> From<&'a KeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for &'a PrimaryKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<&'a KeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for &'a PrimaryKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: &'a PrimaryKeyAmalgamation<'a, PublicParts>) -> Self
fn from(p: &'a PrimaryKeyAmalgamation<'a, PublicParts>) -> Self
Source§impl<'a> From<&'a KeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for &'a SubordinateKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<&'a KeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for &'a SubordinateKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: &'a SubordinateKeyAmalgamation<'a, PublicParts>) -> Self
fn from(p: &'a SubordinateKeyAmalgamation<'a, PublicParts>) -> Self
Source§impl<'a> From<&'a KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<&'a KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: &'a ErasedKeyAmalgamation<'a, PublicParts>) -> Self
fn from(p: &'a ErasedKeyAmalgamation<'a, PublicParts>) -> Self
Source§impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for &'a PrimaryKeyAmalgamation<'a, PublicParts>
impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for &'a PrimaryKeyAmalgamation<'a, PublicParts>
Source§fn from(p: &'a PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: &'a PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for &'a PrimaryKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for &'a PrimaryKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: &'a PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: &'a PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for &'a SubordinateKeyAmalgamation<'a, PublicParts>
impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for &'a SubordinateKeyAmalgamation<'a, PublicParts>
Source§fn from(p: &'a SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: &'a SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for &'a SubordinateKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for &'a SubordinateKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: &'a SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: &'a SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, PublicParts>
Source§fn from(p: &'a ErasedKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: &'a ErasedKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: &'a ErasedKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: &'a ErasedKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<&'a KeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for &'a PrimaryKeyAmalgamation<'a, PublicParts>
impl<'a> From<&'a KeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for &'a PrimaryKeyAmalgamation<'a, PublicParts>
Source§fn from(p: &'a PrimaryKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(p: &'a PrimaryKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Source§impl<'a> From<&'a KeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for &'a SubordinateKeyAmalgamation<'a, PublicParts>
impl<'a> From<&'a KeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for &'a SubordinateKeyAmalgamation<'a, PublicParts>
Source§fn from(p: &'a SubordinateKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(p: &'a SubordinateKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Source§impl<'a> From<&'a KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<&'a KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, PublicParts>
Source§fn from(p: &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(p: &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Source§impl<'a> From<&'a mut KeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for &'a mut PrimaryKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<&'a mut KeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for &'a mut PrimaryKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: &'a mut PrimaryKeyAmalgamation<'a, PublicParts>) -> Self
fn from(p: &'a mut PrimaryKeyAmalgamation<'a, PublicParts>) -> Self
Source§impl<'a> From<&'a mut KeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for &'a mut SubordinateKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<&'a mut KeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for &'a mut SubordinateKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: &'a mut SubordinateKeyAmalgamation<'a, PublicParts>) -> Self
fn from(p: &'a mut SubordinateKeyAmalgamation<'a, PublicParts>) -> Self
Source§impl<'a> From<&'a mut KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for &'a mut ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<&'a mut KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for &'a mut ErasedKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: &'a mut ErasedKeyAmalgamation<'a, PublicParts>) -> Self
fn from(p: &'a mut ErasedKeyAmalgamation<'a, PublicParts>) -> Self
Source§impl<'a> From<&'a mut KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for &'a mut PrimaryKeyAmalgamation<'a, PublicParts>
impl<'a> From<&'a mut KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for &'a mut PrimaryKeyAmalgamation<'a, PublicParts>
Source§fn from(p: &'a mut PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: &'a mut PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<&'a mut KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for &'a mut PrimaryKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<&'a mut KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for &'a mut PrimaryKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: &'a mut PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: &'a mut PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<&'a mut KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for &'a mut SubordinateKeyAmalgamation<'a, PublicParts>
impl<'a> From<&'a mut KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for &'a mut SubordinateKeyAmalgamation<'a, PublicParts>
Source§fn from(p: &'a mut SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: &'a mut SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<&'a mut KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for &'a mut SubordinateKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<&'a mut KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for &'a mut SubordinateKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: &'a mut SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: &'a mut SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<&'a mut KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a mut ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<&'a mut KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a mut ErasedKeyAmalgamation<'a, PublicParts>
Source§fn from(p: &'a mut ErasedKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: &'a mut ErasedKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<&'a mut KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a mut ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<&'a mut KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a mut ErasedKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: &'a mut ErasedKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: &'a mut ErasedKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<&'a mut KeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for &'a mut PrimaryKeyAmalgamation<'a, PublicParts>
impl<'a> From<&'a mut KeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for &'a mut PrimaryKeyAmalgamation<'a, PublicParts>
Source§fn from(p: &'a mut PrimaryKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(p: &'a mut PrimaryKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Source§impl<'a> From<&'a mut KeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for &'a mut SubordinateKeyAmalgamation<'a, PublicParts>
impl<'a> From<&'a mut KeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for &'a mut SubordinateKeyAmalgamation<'a, PublicParts>
Source§fn from(p: &'a mut SubordinateKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(p: &'a mut SubordinateKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Source§impl<'a> From<&'a mut KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for &'a mut ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<&'a mut KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for &'a mut ErasedKeyAmalgamation<'a, PublicParts>
Source§fn from(p: &'a mut ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(p: &'a mut ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Source§impl<'a, P: 'a + KeyParts> From<KeyAmalgamation<'a, P, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, P>
impl<'a, P: 'a + KeyParts> From<KeyAmalgamation<'a, P, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, P>
Source§fn from(ka: PrimaryKeyAmalgamation<'a, P>) -> Self
fn from(ka: PrimaryKeyAmalgamation<'a, P>) -> Self
Source§impl<'a, P: 'a + KeyParts> From<KeyAmalgamation<'a, P, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, P>
impl<'a, P: 'a + KeyParts> From<KeyAmalgamation<'a, P, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, P>
Source§fn from(ka: SubordinateKeyAmalgamation<'a, P>) -> Self
fn from(ka: SubordinateKeyAmalgamation<'a, P>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for PrimaryKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for PrimaryKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: PrimaryKeyAmalgamation<'a, PublicParts>) -> Self
fn from(p: PrimaryKeyAmalgamation<'a, PublicParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(ka: PrimaryKeyAmalgamation<'a, PublicParts>) -> Self
fn from(ka: PrimaryKeyAmalgamation<'a, PublicParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for SubordinateKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for SubordinateKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: SubordinateKeyAmalgamation<'a, PublicParts>) -> Self
fn from(p: SubordinateKeyAmalgamation<'a, PublicParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(ka: SubordinateKeyAmalgamation<'a, PublicParts>) -> Self
fn from(ka: SubordinateKeyAmalgamation<'a, PublicParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: ErasedKeyAmalgamation<'a, PublicParts>) -> Self
fn from(p: ErasedKeyAmalgamation<'a, PublicParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for PrimaryKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for PrimaryKeyAmalgamation<'a, PublicParts>
Source§fn from(p: PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
Source§fn from(ka: PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
fn from(ka: PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for PrimaryKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for PrimaryKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(ka: PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
fn from(ka: PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for SubordinateKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for SubordinateKeyAmalgamation<'a, PublicParts>
Source§fn from(p: SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
Source§fn from(ka: SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
fn from(ka: SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for SubordinateKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for SubordinateKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(ka: SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
fn from(ka: SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, PublicParts>
Source§fn from(p: ErasedKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: ErasedKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
Source§fn from(p: ErasedKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: ErasedKeyAmalgamation<'a, SecretParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for PrimaryKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for PrimaryKeyAmalgamation<'a, PublicParts>
Source§fn from(p: PrimaryKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(p: PrimaryKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
Source§fn from(ka: PrimaryKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(ka: PrimaryKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for SubordinateKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for SubordinateKeyAmalgamation<'a, PublicParts>
Source§fn from(p: SubordinateKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(p: SubordinateKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
Source§fn from(ka: SubordinateKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(ka: SubordinateKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Source§impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, PublicParts>
Source§fn from(p: ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(p: ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Source§impl<'a, P, R, R2> From<ValidKeyAmalgamation<'a, P, R, R2>> for KeyAmalgamation<'a, P, R, R2>
impl<'a, P, R, R2> From<ValidKeyAmalgamation<'a, P, R, R2>> for KeyAmalgamation<'a, P, R, R2>
Source§fn from(vka: ValidKeyAmalgamation<'a, P, R, R2>) -> Self
fn from(vka: ValidKeyAmalgamation<'a, P, R, R2>) -> Self
Source§impl<'a, P, R, R2: PartialEq> PartialEq for KeyAmalgamation<'a, P, R, R2>
impl<'a, P, R, R2: PartialEq> PartialEq for KeyAmalgamation<'a, P, R, R2>
Source§fn eq(&self, other: &KeyAmalgamation<'a, P, R, R2>) -> bool
fn eq(&self, other: &KeyAmalgamation<'a, P, R, R2>) -> bool
self and other values to be equal, and is used by ==.