Enum sequoia_openpgp::packet::Key
source · #[non_exhaustive]pub enum Key<P: KeyParts, R: KeyRole> {
V4(Key4<P, R>),
}
Expand description
Holds a public key, public subkey, private key or private subkey packet.
The different Key
packets are described in Section 5.5 of RFC 4880.
Note: This enum cannot be exhaustively matched to allow future extensions.
§Key Variants
There are four different types of keys in OpenPGP: public keys, secret keys, public subkeys, and secret subkeys. Although the semantics of each type of key are slightly different, the underlying representation is identical (even a public key and a secret key are the same: the public key variant just contains 0 bits of secret key material).
In Sequoia, we use a single type, Key
, for all four variants.
To improve type safety, we use marker traits rather than an enum
to distinguish them. Specifically, we Key
is generic over two
type variables, P
and R
.
P
and R
take marker traits, which describe how any secret key
material should be treated, and the key’s role (primary or
subordinate). The markers also determine the Key
’s behavior and
the exposed functionality. P
can be key::PublicParts
,
key::SecretParts
, or key::UnspecifiedParts
. And, R
can
be key::PrimaryRole
, key::SubordinateRole
, or
key::UnspecifiedRole
.
If P
is key::PublicParts
, any secret key material that is
present is ignored. For instance, when serializing a key with
this marker, any secret key material will be skipped. This is
illutrated in the following example. If P
is
key::SecretParts
, then the key definitely contains secret key
material (although it is not guaranteed that the secret key
material is valid), and methods that require secret key material
are available.
Unlike P
, R
does not say anything about the Key
’s content.
But, a key’s role does influence’s the key’s semantics. For
instance, some of a primary key’s meta-data is located on the
primary User ID whereas a subordinate key’s meta-data is located
on its binding signature.
The unspecified variants key::UnspecifiedParts
and
key::UnspecifiedRole
exist to simplify type erasure, which is
needed to mix different types of keys in a single collection. For
instance, Cert::keys
returns an iterator over the keys in a
certificate. Since the keys have different roles (a primary key
and zero or more subkeys), but the Iterator
has to be over a
single, fixed type, the returned keys use the
key::UnspecifiedRole
marker.
§Examples
Serializing a public key with secret key material drops the secret key material:
use sequoia_openpgp as openpgp;
use openpgp::cert::prelude::*;
use openpgp::packet::prelude::*;
use sequoia_openpgp::parse::Parse;
use openpgp::serialize::Serialize;
// Generate a new certificate. It has secret key material.
let (cert, _) = CertBuilder::new()
.generate()?;
let pk = cert.primary_key().key();
assert!(pk.has_secret());
// Serializing a `Key<key::PublicParts, _>` drops the secret key
// material.
let mut bytes = Vec::new();
Packet::from(pk.clone()).serialize(&mut bytes);
let p : Packet = Packet::from_bytes(&bytes)?;
if let Packet::PublicKey(key) = p {
assert!(! key.has_secret());
} else {
unreachable!();
}
§Conversions
Sometimes it is necessary to change a marker. For instance, to
help prevent a user from inadvertently leaking secret key
material, the Cert
data structure never returns keys with the
key::SecretParts
marker. This means, to use any secret key
material, e.g., when creating a Signer
, the user needs to
explicitly opt-in by changing the marker using
Key::parts_into_secret
or Key::parts_as_secret
.
For P
, the conversion functions are: Key::parts_into_public
,
Key::parts_as_public
, Key::parts_into_secret
,
Key::parts_as_secret
, Key::parts_into_unspecified
, and
Key::parts_as_unspecified
. With the exception of converting
P
to key::SecretParts
, these functions are infallible.
Converting P
to key::SecretParts
may fail if the key doesn’t
have any secret key material. (Note: although the secret key
material is required, it not checked for validity.)
For R
, the conversion functions are Key::role_into_primary
,
Key::role_as_primary
, Key::role_into_subordinate
,
Key::role_as_subordinate
, Key::role_into_unspecified
, and
Key::role_as_unspecified
.
It is also possible to use From
.
§Examples
Changing a marker:
use sequoia_openpgp as openpgp;
use openpgp::cert::prelude::*;
use openpgp::packet::prelude::*;
// Generate a new certificate. It has secret key material.
let (cert, _) = CertBuilder::new()
.generate()?;
let pk: &Key<key::PublicParts, key::PrimaryRole>
= cert.primary_key().key();
// `has_secret`s is one of the few methods that ignores the
// parts type.
assert!(pk.has_secret());
// Treat it like a secret key. This only works if `pk` really
// has secret key material (which it does in this case, see above).
let sk = pk.parts_as_secret()?;
assert!(sk.has_secret());
// And back.
let pk = sk.parts_as_public();
// Yes, the secret key material is still there.
assert!(pk.has_secret());
The Cert
data structure only returns public keys. To work
with any secret key material, the Key
first needs to be
converted to a secret key. This is necessary, for instance, when
creating a Signer
:
use std::time;
use sequoia_openpgp as openpgp;
use openpgp::cert::prelude::*;
use openpgp::crypto::KeyPair;
use openpgp::policy::StandardPolicy;
let p = &StandardPolicy::new();
let the_past = time::SystemTime::now() - time::Duration::from_secs(1);
let (cert, _) = CertBuilder::new()
.set_creation_time(the_past)
.generate()?;
// Set the certificate to expire now. To do this, we need
// to create a new self-signature, and sign it using a
// certification-capable key. The primary key is always
// certification capable.
let mut keypair = cert.primary_key()
.key().clone().parts_into_secret()?.into_keypair()?;
let sigs = cert.set_expiration_time(p, None, &mut keypair,
Some(time::SystemTime::now()))?;
let cert = cert.insert_packets(sigs)?;
// It's expired now.
assert!(cert.with_policy(p, None)?.alive().is_err());
§Key Generation
Key
is a wrapper around the different key formats.
(Currently, Sequoia only supports version 4 keys, however, future
versions may add limited support for version 3 keys to facilitate
working with achieved messages, and RFC 4880bis includes a
proposal for a new key format.) As such, it doesn’t provide a
mechanism to generate keys or import existing key material.
Instead, use the format-specific functions (e.g.,
Key4::generate_ecc
) and then convert the result into a Key
packet, as the following example demonstrates.
§Examples
use sequoia_openpgp as openpgp;
use openpgp::packet::prelude::*;
use openpgp::types::Curve;
let key: Key<key::SecretParts, key::PrimaryRole>
= Key::from(Key4::generate_ecc(true, Curve::Ed25519)?);
§Password Protection
OpenPGP provides a mechanism to password protect keys. If a key
is password protected, you need to decrypt the password using
Key::decrypt_secret
before using its secret key material
(e.g., to decrypt a message, or to generate a signature).
§A note on equality
The implementation of Eq
for Key
compares the serialized form
of Key
s. Comparing or serializing values of Key<PublicParts, _>
ignore secret key material, whereas the secret key material is
considered and serialized for Key<SecretParts, _>
, and for
Key<UnspecifiedParts, _>
if present. To explicitly exclude the
secret key material from the comparison, use Key::public_cmp
or Key::public_eq
.
When merging in secret key material from untrusted sources, you need to be very careful: secret key material is not cryptographically protected by the key’s self signature. Thus, an attacker can provide a valid key with a valid self signature, but invalid secret key material. If naively merged, this could overwrite valid secret key material, and thereby render the key useless. Unfortunately, the only way to find out that the secret key material is bad is to actually try using it. But, because the secret key material is usually encrypted, this can’t always be done automatically.
Compare:
use sequoia_openpgp as openpgp;
use openpgp::cert::prelude::*;
use openpgp::packet::prelude::*;
use openpgp::packet::key::*;
// Generate a new certificate. It has secret key material.
let (cert, _) = CertBuilder::new()
.generate()?;
let sk: &Key<PublicParts, _> = cert.primary_key().key();
assert!(sk.has_secret());
// Strip the secret key material.
let cert = cert.clone().strip_secret_key_material();
let pk: &Key<PublicParts, _> = cert.primary_key().key();
assert!(! pk.has_secret());
// Eq on Key<PublicParts, _> compares only the public bits, so it
// considers pk and sk to be equal.
assert_eq!(pk, sk);
// Convert to Key<UnspecifiedParts, _>.
let sk: &Key<UnspecifiedParts, _> = sk.parts_as_unspecified();
let pk: &Key<UnspecifiedParts, _> = pk.parts_as_unspecified();
// Eq on Key<UnspecifiedParts, _> compares both the public and the
// secret bits, so it considers pk and sk to be different.
assert_ne!(pk, sk);
// In any case, Key::public_eq only compares the public bits,
// so it considers them to be equal.
assert!(Key::public_eq(pk, sk));
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Implementations§
source§impl<P, R> Key<P, R>
impl<P, R> Key<P, R>
sourcepub fn parts_into_public(self) -> Key<PublicParts, R>
pub fn parts_into_public(self) -> Key<PublicParts, R>
Changes the key’s parts tag to PublicParts
.
sourcepub fn parts_as_public(&self) -> &Key<PublicParts, R>
pub fn parts_as_public(&self) -> &Key<PublicParts, R>
Changes the key’s parts tag to PublicParts
.
sourcepub fn parts_as_public_mut(&mut self) -> &mut Key<PublicParts, R>
pub fn parts_as_public_mut(&mut self) -> &mut Key<PublicParts, R>
Changes the key’s parts tag to PublicParts
.
sourcepub fn parts_into_secret(self) -> Result<Key<SecretParts, R>>
pub fn parts_into_secret(self) -> Result<Key<SecretParts, R>>
Changes the key’s parts tag to SecretParts
.
sourcepub fn parts_as_secret(&self) -> Result<&Key<SecretParts, R>>
pub fn parts_as_secret(&self) -> Result<&Key<SecretParts, R>>
Changes the key’s parts tag to SecretParts
.
sourcepub fn parts_as_secret_mut(&mut self) -> Result<&mut Key<SecretParts, R>>
pub fn parts_as_secret_mut(&mut self) -> Result<&mut Key<SecretParts, R>>
Changes the key’s parts tag to SecretParts
.
sourcepub fn parts_into_unspecified(self) -> Key<UnspecifiedParts, R>
pub fn parts_into_unspecified(self) -> Key<UnspecifiedParts, R>
Changes the key’s parts tag to UnspecifiedParts
.
sourcepub fn parts_as_unspecified(&self) -> &Key<UnspecifiedParts, R>
pub fn parts_as_unspecified(&self) -> &Key<UnspecifiedParts, R>
Changes the key’s parts tag to UnspecifiedParts
.
sourcepub fn parts_as_unspecified_mut(&mut self) -> &mut Key<UnspecifiedParts, R>
pub fn parts_as_unspecified_mut(&mut self) -> &mut Key<UnspecifiedParts, R>
Changes the key’s parts tag to UnspecifiedParts
.
source§impl<P, R> Key<P, R>
impl<P, R> Key<P, R>
sourcepub fn role_into_primary(self) -> Key<P, PrimaryRole>
pub fn role_into_primary(self) -> Key<P, PrimaryRole>
Changes the key’s role tag to PrimaryRole
.
sourcepub fn role_as_primary(&self) -> &Key<P, PrimaryRole>
pub fn role_as_primary(&self) -> &Key<P, PrimaryRole>
Changes the key’s role tag to PrimaryRole
.
sourcepub fn role_as_primary_mut(&mut self) -> &mut Key<P, PrimaryRole>
pub fn role_as_primary_mut(&mut self) -> &mut Key<P, PrimaryRole>
Changes the key’s role tag to PrimaryRole
.
sourcepub fn role_into_subordinate(self) -> Key<P, SubordinateRole>
pub fn role_into_subordinate(self) -> Key<P, SubordinateRole>
Changes the key’s role tag to SubordinateRole
.
sourcepub fn role_as_subordinate(&self) -> &Key<P, SubordinateRole>
pub fn role_as_subordinate(&self) -> &Key<P, SubordinateRole>
Changes the key’s role tag to SubordinateRole
.
sourcepub fn role_as_subordinate_mut(&mut self) -> &mut Key<P, SubordinateRole>
pub fn role_as_subordinate_mut(&mut self) -> &mut Key<P, SubordinateRole>
Changes the key’s role tag to SubordinateRole
.
sourcepub fn role_into_unspecified(self) -> Key<P, UnspecifiedRole>
pub fn role_into_unspecified(self) -> Key<P, UnspecifiedRole>
Changes the key’s role tag to UnspecifiedRole
.
sourcepub fn role_as_unspecified(&self) -> &Key<P, UnspecifiedRole>
pub fn role_as_unspecified(&self) -> &Key<P, UnspecifiedRole>
Changes the key’s role tag to UnspecifiedRole
.
sourcepub fn role_as_unspecified_mut(&mut self) -> &mut Key<P, UnspecifiedRole>
pub fn role_as_unspecified_mut(&mut self) -> &mut Key<P, UnspecifiedRole>
Changes the key’s role tag to UnspecifiedRole
.
source§impl<P, R> Key<P, R>
impl<P, R> Key<P, R>
Cryptographic operations using the key material.
sourcepub fn encrypt(&self, data: &SessionKey) -> Result<Ciphertext>
pub fn encrypt(&self, data: &SessionKey) -> Result<Ciphertext>
Encrypts the given data with this key.
source§impl<P: KeyParts, R: KeyRole> Key<P, R>
impl<P: KeyParts, R: KeyRole> Key<P, R>
sourcepub fn public_cmp<PB, RB>(&self, b: &Key<PB, RB>) -> Ordering
pub fn public_cmp<PB, RB>(&self, b: &Key<PB, RB>) -> Ordering
Compares the public bits of two keys.
This returns Ordering::Equal
if the public MPIs, version,
creation time and algorithm of the two Key
s match. This
does not consider the packet’s encoding, packet’s tag or the
secret key material.
sourcepub fn public_eq<PB, RB>(&self, b: &Key<PB, RB>) -> bool
pub fn public_eq<PB, RB>(&self, b: &Key<PB, RB>) -> bool
This method tests for self and other values to be equal modulo the secret key material.
This returns true if the public MPIs, creation time and
algorithm of the two Key
s match. This does not consider
the packet’s encoding, packet’s tag or the secret key
material.
source§impl<R: KeyRole> Key<SecretParts, R>
impl<R: KeyRole> Key<SecretParts, R>
sourcepub fn into_keypair(self) -> Result<KeyPair>
pub fn into_keypair(self) -> Result<KeyPair>
Creates a new key pair from a Key
with an unencrypted
secret key.
If the Key
is password protected, you first need to decrypt
it using Key::decrypt_secret
.
§Errors
Fails if the secret key is encrypted.
§Examples
Revoke a certificate by signing a new revocation certificate:
use std::time;
use sequoia_openpgp as openpgp;
use openpgp::cert::prelude::*;
use openpgp::crypto::KeyPair;
use openpgp::types::ReasonForRevocation;
// Generate a certificate.
let (cert, _) =
CertBuilder::general_purpose(None,
Some("Alice Lovelace <alice@example.org>"))
.generate()?;
// Use the secret key material to sign a revocation certificate.
let mut keypair = cert.primary_key()
.key().clone().parts_into_secret()?
.into_keypair()?;
let rev = cert.revoke(&mut keypair,
ReasonForRevocation::KeyCompromised,
b"It was the maid :/")?;
sourcepub fn decrypt_secret(self, password: &Password) -> Result<Self>
pub fn decrypt_secret(self, password: &Password) -> Result<Self>
Decrypts the secret key material.
In OpenPGP, secret key material can be protected with a password. The password is usually hardened using a KDF.
This function takes ownership of the Key
, decrypts the
secret key material using the password, and returns a new key
whose secret key material is not password protected.
If the secret key material is not password protected or if the password is wrong, this function returns an error.
§Examples
Sign a new revocation certificate using a password-protected key:
use sequoia_openpgp as openpgp;
use openpgp::cert::prelude::*;
use openpgp::types::ReasonForRevocation;
// Generate a certificate whose secret key material is
// password protected.
let (cert, _) =
CertBuilder::general_purpose(None,
Some("Alice Lovelace <alice@example.org>"))
.set_password(Some("1234".into()))
.generate()?;
// Use the secret key material to sign a revocation certificate.
let key = cert.primary_key().key().clone().parts_into_secret()?;
// We can't turn it into a keypair without decrypting it.
assert!(key.clone().into_keypair().is_err());
// And, we need to use the right password.
assert!(key.clone()
.decrypt_secret(&"correct horse battery staple".into())
.is_err());
// Let's do it right:
let mut keypair = key.decrypt_secret(&"1234".into())?.into_keypair()?;
let rev = cert.revoke(&mut keypair,
ReasonForRevocation::KeyCompromised,
b"It was the maid :/")?;
sourcepub fn encrypt_secret(self, password: &Password) -> Result<Self>
pub fn encrypt_secret(self, password: &Password) -> Result<Self>
Encrypts the secret key material.
In OpenPGP, secret key material can be protected with a password. The password is usually hardened using a KDF.
This function takes ownership of the Key
, encrypts the
secret key material using the password, and returns a new key
whose secret key material is protected with the password.
If the secret key material is already password protected, this function returns an error.
§Examples
This example demonstrates how to encrypt the secret key
material of every key in a certificate. Decryption can be
done the same way with Key::decrypt_secret
.
use sequoia_openpgp as openpgp;
use openpgp::cert::prelude::*;
use openpgp::packet::Packet;
// Generate a certificate whose secret key material is
// not password protected.
let (cert, _) =
CertBuilder::general_purpose(None,
Some("Alice Lovelace <alice@example.org>"))
.generate()?;
// Encrypt every key.
let mut encrypted_keys: Vec<Packet> = Vec::new();
for ka in cert.keys().secret() {
assert!(ka.has_unencrypted_secret());
// Encrypt the key's secret key material.
let key = ka.key().clone().encrypt_secret(&"1234".into())?;
assert!(! key.has_unencrypted_secret());
// We cannot merge it right now, because `cert` is borrowed.
encrypted_keys.push(if ka.primary() {
key.role_into_primary().into()
} else {
key.role_into_subordinate().into()
});
}
// Merge the keys into the certificate. Note: `Cert::insert_packets`
// prefers added versions of keys. So, the encrypted version
// will override the decrypted version.
let cert = cert.insert_packets(encrypted_keys)?;
// Now the every key's secret key material is encrypted. We'll
// demonstrate this using the primary key:
let key = cert.primary_key().key().parts_as_secret()?;
assert!(! key.has_unencrypted_secret());
// We can't turn it into a keypair without decrypting it.
assert!(key.clone().into_keypair().is_err());
// And, we need to use the right password.
assert!(key.clone()
.decrypt_secret(&"correct horse battery staple".into())
.is_err());
// Let's do it right:
let mut keypair = key.clone()
.decrypt_secret(&"1234".into())?.into_keypair()?;
source§impl<R: KeyRole> Key<PublicParts, R>
impl<R: KeyRole> Key<PublicParts, R>
Secret key handling.
sourcepub fn take_secret(self) -> (Key<PublicParts, R>, Option<SecretKeyMaterial>)
pub fn take_secret(self) -> (Key<PublicParts, R>, Option<SecretKeyMaterial>)
Takes the key packet’s SecretKeyMaterial
, if any.
sourcepub fn add_secret(
self,
secret: SecretKeyMaterial,
) -> (Key<SecretParts, R>, Option<SecretKeyMaterial>)
pub fn add_secret( self, secret: SecretKeyMaterial, ) -> (Key<SecretParts, R>, Option<SecretKeyMaterial>)
Adds SecretKeyMaterial
to the packet, returning the old if
any.
sourcepub fn steal_secret(&mut self) -> Option<SecretKeyMaterial>
pub fn steal_secret(&mut self) -> Option<SecretKeyMaterial>
Takes the key packet’s SecretKeyMaterial
, if any.
source§impl<R: KeyRole> Key<UnspecifiedParts, R>
impl<R: KeyRole> Key<UnspecifiedParts, R>
Secret key handling.
sourcepub fn take_secret(self) -> (Key<PublicParts, R>, Option<SecretKeyMaterial>)
pub fn take_secret(self) -> (Key<PublicParts, R>, Option<SecretKeyMaterial>)
Takes the key packet’s SecretKeyMaterial
, if any.
sourcepub fn add_secret(
self,
secret: SecretKeyMaterial,
) -> (Key<SecretParts, R>, Option<SecretKeyMaterial>)
pub fn add_secret( self, secret: SecretKeyMaterial, ) -> (Key<SecretParts, R>, Option<SecretKeyMaterial>)
Adds SecretKeyMaterial
to the packet, returning the old if
any.
sourcepub fn steal_secret(&mut self) -> Option<SecretKeyMaterial>
pub fn steal_secret(&mut self) -> Option<SecretKeyMaterial>
Takes the key packet’s SecretKeyMaterial
, if any.
source§impl<R: KeyRole> Key<SecretParts, R>
impl<R: KeyRole> Key<SecretParts, R>
Secret key handling.
sourcepub fn take_secret(self) -> (Key<PublicParts, R>, SecretKeyMaterial)
pub fn take_secret(self) -> (Key<PublicParts, R>, SecretKeyMaterial)
Takes the key packet’s SecretKeyMaterial
.
sourcepub fn add_secret(
self,
secret: SecretKeyMaterial,
) -> (Key<SecretParts, R>, SecretKeyMaterial)
pub fn add_secret( self, secret: SecretKeyMaterial, ) -> (Key<SecretParts, R>, SecretKeyMaterial)
Adds SecretKeyMaterial
to the packet, returning the old.
source§impl<P: KeyParts> Key<P, SubordinateRole>
impl<P: KeyParts> Key<P, SubordinateRole>
sourcepub fn bind(
&self,
signer: &mut dyn Signer,
cert: &Cert,
signature: SignatureBuilder,
) -> Result<Signature>
pub fn bind( &self, signer: &mut dyn Signer, cert: &Cert, signature: SignatureBuilder, ) -> Result<Signature>
Creates a binding signature.
The signature binds this subkey to cert
. signer
will be used
to create a signature using signature
as builder.
Thehash_algo
defaults to SHA512, creation_time
to the
current time.
Note that subkeys with signing capabilities need a primary
key binding signature. If you are creating this binding
signature from a previous binding signature, you can reuse the
primary key binding signature if it is still valid and meets
current algorithm requirements. Otherwise, you can create one
using SignatureBuilder::sign_primary_key_binding
.
This function adds a creation time subpacket, a issuer fingerprint subpacket, and a issuer subpacket to the signature.
§Examples
This example demonstrates how to bind this key to a Cert. Note
that in general, the CertBuilder
is a better way to add
subkeys to a Cert.
use sequoia_openpgp::policy::StandardPolicy;
let p = &StandardPolicy::new();
// Generate a Cert, and create a keypair from the primary key.
let (cert, _) = CertBuilder::new().generate()?;
let mut keypair = cert.primary_key().key().clone()
.parts_into_secret()?.into_keypair()?;
// Let's add an encryption subkey.
let flags = KeyFlags::empty().set_storage_encryption();
assert_eq!(cert.keys().with_policy(p, None).alive().revoked(false)
.key_flags(&flags).count(),
0);
// Generate a subkey and a binding signature.
let subkey: Key<_, key::SubordinateRole> =
Key4::generate_ecc(false, Curve::Cv25519)?
.into();
let builder = signature::SignatureBuilder::new(SignatureType::SubkeyBinding)
.set_key_flags(flags.clone())?;
let binding = subkey.bind(&mut keypair, &cert, builder)?;
// Now merge the key and binding signature into the Cert.
let cert = cert.insert_packets(vec![Packet::from(subkey),
binding.into()])?;
// Check that we have an encryption subkey.
assert_eq!(cert.keys().with_policy(p, None).alive().revoked(false)
.key_flags(flags).count(),
1);
Methods from Deref<Target = Key4<P, R>>§
sourcepub fn parts_as_public(&self) -> &Key4<PublicParts, R>
pub fn parts_as_public(&self) -> &Key4<PublicParts, R>
Changes the key’s parts tag to PublicParts
.
sourcepub fn parts_as_public_mut(&mut self) -> &mut Key4<PublicParts, R>
pub fn parts_as_public_mut(&mut self) -> &mut Key4<PublicParts, R>
Changes the key’s parts tag to PublicParts
.
sourcepub fn parts_as_secret(&self) -> Result<&Key4<SecretParts, R>>
pub fn parts_as_secret(&self) -> Result<&Key4<SecretParts, R>>
Changes the key’s parts tag to SecretParts
.
sourcepub fn parts_as_secret_mut(&mut self) -> Result<&mut Key4<SecretParts, R>>
pub fn parts_as_secret_mut(&mut self) -> Result<&mut Key4<SecretParts, R>>
Changes the key’s parts tag to SecretParts
.
sourcepub fn parts_as_unspecified(&self) -> &Key4<UnspecifiedParts, R>
pub fn parts_as_unspecified(&self) -> &Key4<UnspecifiedParts, R>
Changes the key’s parts tag to UnspecifiedParts
.
sourcepub fn parts_as_unspecified_mut(&mut self) -> &mut Key4<UnspecifiedParts, R>
pub fn parts_as_unspecified_mut(&mut self) -> &mut Key4<UnspecifiedParts, R>
Changes the key’s parts tag to UnspecifiedParts
.
sourcepub fn role_as_primary(&self) -> &Key4<P, PrimaryRole>
pub fn role_as_primary(&self) -> &Key4<P, PrimaryRole>
Changes the key’s role tag to PrimaryRole
.
sourcepub fn role_as_primary_mut(&mut self) -> &mut Key4<P, PrimaryRole>
pub fn role_as_primary_mut(&mut self) -> &mut Key4<P, PrimaryRole>
Changes the key’s role tag to PrimaryRole
.
sourcepub fn role_as_subordinate(&self) -> &Key4<P, SubordinateRole>
pub fn role_as_subordinate(&self) -> &Key4<P, SubordinateRole>
Changes the key’s role tag to SubordinateRole
.
sourcepub fn role_as_subordinate_mut(&mut self) -> &mut Key4<P, SubordinateRole>
pub fn role_as_subordinate_mut(&mut self) -> &mut Key4<P, SubordinateRole>
Changes the key’s role tag to SubordinateRole
.
sourcepub fn role_as_unspecified(&self) -> &Key4<P, UnspecifiedRole>
pub fn role_as_unspecified(&self) -> &Key4<P, UnspecifiedRole>
Changes the key’s role tag to UnspecifiedRole
.
sourcepub fn role_as_unspecified_mut(&mut self) -> &mut Key4<P, UnspecifiedRole>
pub fn role_as_unspecified_mut(&mut self) -> &mut Key4<P, UnspecifiedRole>
Changes the key’s role tag to UnspecifiedRole
.
sourcepub fn hash_algo_security(&self) -> HashAlgoSecurity
pub fn hash_algo_security(&self) -> HashAlgoSecurity
The security requirements of the hash algorithm for self-signatures.
A cryptographic hash algorithm usually has three security properties: pre-image resistance, second pre-image resistance, and collision resistance. If an attacker can influence the signed data, then the hash algorithm needs to have both second pre-image resistance, and collision resistance. If not, second pre-image resistance is sufficient.
In general, an attacker may be able to influence third-party signatures. But direct key signatures, and binding signatures are only over data fully determined by signer. And, an attacker’s control over self signatures over User IDs is limited due to their structure.
These observations can be used to extend the life of a hash algorithm after its collision resistance has been partially compromised, but not completely broken. For more details, please refer to the documentation for HashAlgoSecurity.
sourcepub fn public_cmp<PB, RB>(&self, b: &Key4<PB, RB>) -> Ordering
pub fn public_cmp<PB, RB>(&self, b: &Key4<PB, RB>) -> Ordering
Compares the public bits of two keys.
This returns Ordering::Equal
if the public MPIs, creation
time, and algorithm of the two Key4
s match. This does not
consider the packets’ encodings, packets’ tags or their secret
key material.
sourcepub fn public_eq<PB, RB>(&self, b: &Key4<PB, RB>) -> bool
pub fn public_eq<PB, RB>(&self, b: &Key4<PB, RB>) -> bool
Tests whether two keys are equal modulo their secret key material.
This returns true if the public MPIs, creation time and
algorithm of the two Key4
s match. This does not consider
the packets’ encodings, packets’ tags or their secret key
material.
sourcepub fn public_hash<H>(&self, state: &mut H)where
H: Hasher,
pub fn public_hash<H>(&self, state: &mut H)where
H: Hasher,
Hashes everything but any secret key material into state.
This is an alternate implementation of Hash
, which never
hashes the secret key material.
sourcepub fn creation_time(&self) -> SystemTime
pub fn creation_time(&self) -> SystemTime
Gets the Key
’s creation time.
sourcepub fn set_creation_time<T>(&mut self, timestamp: T) -> Result<SystemTime>where
T: Into<SystemTime>,
pub fn set_creation_time<T>(&mut self, timestamp: T) -> Result<SystemTime>where
T: Into<SystemTime>,
Sets the Key
’s creation time.
timestamp
is converted to OpenPGP’s internal format,
Timestamp
: a 32-bit quantity containing the number of
seconds since the Unix epoch.
timestamp
is silently rounded to match the internal
resolution. An error is returned if timestamp
is out of
range.
sourcepub fn pk_algo(&self) -> PublicKeyAlgorithm
pub fn pk_algo(&self) -> PublicKeyAlgorithm
Gets the public key algorithm.
sourcepub fn set_pk_algo(&mut self, pk_algo: PublicKeyAlgorithm) -> PublicKeyAlgorithm
pub fn set_pk_algo(&mut self, pk_algo: PublicKeyAlgorithm) -> PublicKeyAlgorithm
Sets the public key algorithm.
Returns the old public key algorithm.
sourcepub fn set_mpis(&mut self, mpis: PublicKey) -> PublicKey
pub fn set_mpis(&mut self, mpis: PublicKey) -> PublicKey
Sets the Key
’s MPIs.
This function returns the old MPIs, if any.
sourcepub fn has_secret(&self) -> bool
pub fn has_secret(&self) -> bool
Returns whether the Key
contains secret key material.
sourcepub fn has_unencrypted_secret(&self) -> bool
pub fn has_unencrypted_secret(&self) -> bool
Returns whether the Key
contains unencrypted secret key
material.
This returns false if the Key
doesn’t contain any secret key
material.
sourcepub fn optional_secret(&self) -> Option<&SecretKeyMaterial>
pub fn optional_secret(&self) -> Option<&SecretKeyMaterial>
Returns Key
’s secret key material, if any.
sourcepub fn key_handle(&self) -> KeyHandle
pub fn key_handle(&self) -> KeyHandle
Computes and returns the Key
’s Fingerprint
and returns it as
a KeyHandle
.
sourcepub fn fingerprint(&self) -> Fingerprint
pub fn fingerprint(&self) -> Fingerprint
Computes and returns the Key
’s Fingerprint
.
sourcepub fn steal_secret(&mut self) -> Option<SecretKeyMaterial>
pub fn steal_secret(&mut self) -> Option<SecretKeyMaterial>
Takes the Key
’s SecretKeyMaterial
, if any.
sourcepub fn steal_secret(&mut self) -> Option<SecretKeyMaterial>
pub fn steal_secret(&mut self) -> Option<SecretKeyMaterial>
Takes the Key
’s SecretKeyMaterial
, if any.
sourcepub fn secret(&self) -> &SecretKeyMaterial
pub fn secret(&self) -> &SecretKeyMaterial
Gets the Key
’s SecretKeyMaterial
.
sourcepub fn secret_mut(&mut self) -> &mut SecretKeyMaterial
pub fn secret_mut(&mut self) -> &mut SecretKeyMaterial
Gets a mutable reference to the Key
’s SecretKeyMaterial
.
Trait Implementations§
source§impl Any<Key<PublicParts, PrimaryRole>> for Packet
impl Any<Key<PublicParts, PrimaryRole>> for Packet
source§fn downcast(self) -> Result<Key<PublicParts, PrimaryRole>, Packet>
fn downcast(self) -> Result<Key<PublicParts, PrimaryRole>, Packet>
T
, returning the packet if it fails. Read moresource§fn downcast_ref(&self) -> Option<&Key<PublicParts, PrimaryRole>>
fn downcast_ref(&self) -> Option<&Key<PublicParts, PrimaryRole>>
source§fn downcast_mut(&mut self) -> Option<&mut Key<PublicParts, PrimaryRole>>
fn downcast_mut(&mut self) -> Option<&mut Key<PublicParts, PrimaryRole>>
source§impl Any<Key<PublicParts, SubordinateRole>> for Packet
impl Any<Key<PublicParts, SubordinateRole>> for Packet
source§fn downcast(self) -> Result<Key<PublicParts, SubordinateRole>, Packet>
fn downcast(self) -> Result<Key<PublicParts, SubordinateRole>, Packet>
T
, returning the packet if it fails. Read moresource§fn downcast_ref(&self) -> Option<&Key<PublicParts, SubordinateRole>>
fn downcast_ref(&self) -> Option<&Key<PublicParts, SubordinateRole>>
source§fn downcast_mut(&mut self) -> Option<&mut Key<PublicParts, SubordinateRole>>
fn downcast_mut(&mut self) -> Option<&mut Key<PublicParts, SubordinateRole>>
source§impl Any<Key<PublicParts, UnspecifiedRole>> for Packet
impl Any<Key<PublicParts, UnspecifiedRole>> for Packet
source§fn downcast(self) -> Result<Key<PublicParts, UnspecifiedRole>, Packet>
fn downcast(self) -> Result<Key<PublicParts, UnspecifiedRole>, Packet>
T
, returning the packet if it fails. Read moresource§fn downcast_ref(&self) -> Option<&Key<PublicParts, UnspecifiedRole>>
fn downcast_ref(&self) -> Option<&Key<PublicParts, UnspecifiedRole>>
source§fn downcast_mut(&mut self) -> Option<&mut Key<PublicParts, UnspecifiedRole>>
fn downcast_mut(&mut self) -> Option<&mut Key<PublicParts, UnspecifiedRole>>
source§impl Any<Key<SecretParts, PrimaryRole>> for Packet
impl Any<Key<SecretParts, PrimaryRole>> for Packet
source§fn downcast(self) -> Result<Key<SecretParts, PrimaryRole>, Packet>
fn downcast(self) -> Result<Key<SecretParts, PrimaryRole>, Packet>
T
, returning the packet if it fails. Read moresource§fn downcast_ref(&self) -> Option<&Key<SecretParts, PrimaryRole>>
fn downcast_ref(&self) -> Option<&Key<SecretParts, PrimaryRole>>
source§fn downcast_mut(&mut self) -> Option<&mut Key<SecretParts, PrimaryRole>>
fn downcast_mut(&mut self) -> Option<&mut Key<SecretParts, PrimaryRole>>
source§impl Any<Key<SecretParts, SubordinateRole>> for Packet
impl Any<Key<SecretParts, SubordinateRole>> for Packet
source§fn downcast(self) -> Result<Key<SecretParts, SubordinateRole>, Packet>
fn downcast(self) -> Result<Key<SecretParts, SubordinateRole>, Packet>
T
, returning the packet if it fails. Read moresource§fn downcast_ref(&self) -> Option<&Key<SecretParts, SubordinateRole>>
fn downcast_ref(&self) -> Option<&Key<SecretParts, SubordinateRole>>
source§fn downcast_mut(&mut self) -> Option<&mut Key<SecretParts, SubordinateRole>>
fn downcast_mut(&mut self) -> Option<&mut Key<SecretParts, SubordinateRole>>
source§impl Any<Key<SecretParts, UnspecifiedRole>> for Packet
impl Any<Key<SecretParts, UnspecifiedRole>> for Packet
source§fn downcast(self) -> Result<Key<SecretParts, UnspecifiedRole>, Packet>
fn downcast(self) -> Result<Key<SecretParts, UnspecifiedRole>, Packet>
T
, returning the packet if it fails. Read moresource§fn downcast_ref(&self) -> Option<&Key<SecretParts, UnspecifiedRole>>
fn downcast_ref(&self) -> Option<&Key<SecretParts, UnspecifiedRole>>
source§fn downcast_mut(&mut self) -> Option<&mut Key<SecretParts, UnspecifiedRole>>
fn downcast_mut(&mut self) -> Option<&mut Key<SecretParts, UnspecifiedRole>>
source§impl Any<Key<UnspecifiedParts, PrimaryRole>> for Packet
impl Any<Key<UnspecifiedParts, PrimaryRole>> for Packet
source§fn downcast(self) -> Result<Key<UnspecifiedParts, PrimaryRole>, Packet>
fn downcast(self) -> Result<Key<UnspecifiedParts, PrimaryRole>, Packet>
T
, returning the packet if it fails. Read moresource§fn downcast_ref(&self) -> Option<&Key<UnspecifiedParts, PrimaryRole>>
fn downcast_ref(&self) -> Option<&Key<UnspecifiedParts, PrimaryRole>>
source§fn downcast_mut(&mut self) -> Option<&mut Key<UnspecifiedParts, PrimaryRole>>
fn downcast_mut(&mut self) -> Option<&mut Key<UnspecifiedParts, PrimaryRole>>
source§impl Any<Key<UnspecifiedParts, SubordinateRole>> for Packet
impl Any<Key<UnspecifiedParts, SubordinateRole>> for Packet
source§fn downcast(self) -> Result<Key<UnspecifiedParts, SubordinateRole>, Packet>
fn downcast(self) -> Result<Key<UnspecifiedParts, SubordinateRole>, Packet>
T
, returning the packet if it fails. Read moresource§fn downcast_ref(&self) -> Option<&Key<UnspecifiedParts, SubordinateRole>>
fn downcast_ref(&self) -> Option<&Key<UnspecifiedParts, SubordinateRole>>
source§fn downcast_mut(
&mut self,
) -> Option<&mut Key<UnspecifiedParts, SubordinateRole>>
fn downcast_mut( &mut self, ) -> Option<&mut Key<UnspecifiedParts, SubordinateRole>>
source§impl Any<Key<UnspecifiedParts, UnspecifiedRole>> for Packet
impl Any<Key<UnspecifiedParts, UnspecifiedRole>> for Packet
source§fn downcast(self) -> Result<Key<UnspecifiedParts, UnspecifiedRole>, Packet>
fn downcast(self) -> Result<Key<UnspecifiedParts, UnspecifiedRole>, Packet>
T
, returning the packet if it fails. Read moresource§fn downcast_ref(&self) -> Option<&Key<UnspecifiedParts, UnspecifiedRole>>
fn downcast_ref(&self) -> Option<&Key<UnspecifiedParts, UnspecifiedRole>>
source§fn downcast_mut(
&mut self,
) -> Option<&mut Key<UnspecifiedParts, UnspecifiedRole>>
fn downcast_mut( &mut self, ) -> Option<&mut Key<UnspecifiedParts, UnspecifiedRole>>
source§impl<P> From<&Key<P, PrimaryRole>> for &Key<P, SubordinateRole>where
P: KeyParts,
impl<P> From<&Key<P, PrimaryRole>> for &Key<P, SubordinateRole>where
P: KeyParts,
source§fn from(p: &Key<P, PrimaryRole>) -> Self
fn from(p: &Key<P, PrimaryRole>) -> Self
source§impl<P> From<&Key<P, PrimaryRole>> for &Key<P, UnspecifiedRole>where
P: KeyParts,
impl<P> From<&Key<P, PrimaryRole>> for &Key<P, UnspecifiedRole>where
P: KeyParts,
source§fn from(p: &Key<P, PrimaryRole>) -> Self
fn from(p: &Key<P, PrimaryRole>) -> Self
source§impl<P> From<&Key<P, SubordinateRole>> for &Key<P, PrimaryRole>where
P: KeyParts,
impl<P> From<&Key<P, SubordinateRole>> for &Key<P, PrimaryRole>where
P: KeyParts,
source§fn from(p: &Key<P, SubordinateRole>) -> Self
fn from(p: &Key<P, SubordinateRole>) -> Self
source§impl<P> From<&Key<P, SubordinateRole>> for &Key<P, UnspecifiedRole>where
P: KeyParts,
impl<P> From<&Key<P, SubordinateRole>> for &Key<P, UnspecifiedRole>where
P: KeyParts,
source§fn from(p: &Key<P, SubordinateRole>) -> Self
fn from(p: &Key<P, SubordinateRole>) -> Self
source§impl<P> From<&Key<P, UnspecifiedRole>> for &Key<P, PrimaryRole>where
P: KeyParts,
impl<P> From<&Key<P, UnspecifiedRole>> for &Key<P, PrimaryRole>where
P: KeyParts,
source§fn from(p: &Key<P, UnspecifiedRole>) -> Self
fn from(p: &Key<P, UnspecifiedRole>) -> Self
source§impl<P> From<&Key<P, UnspecifiedRole>> for &Key<P, SubordinateRole>where
P: KeyParts,
impl<P> From<&Key<P, UnspecifiedRole>> for &Key<P, SubordinateRole>where
P: KeyParts,
source§fn from(p: &Key<P, UnspecifiedRole>) -> Self
fn from(p: &Key<P, UnspecifiedRole>) -> Self
source§impl From<&Key<PublicParts, PrimaryRole>> for &Key<UnspecifiedParts, SubordinateRole>
impl From<&Key<PublicParts, PrimaryRole>> for &Key<UnspecifiedParts, SubordinateRole>
source§fn from(p: &Key<PublicParts, PrimaryRole>) -> Self
fn from(p: &Key<PublicParts, PrimaryRole>) -> Self
source§impl From<&Key<PublicParts, PrimaryRole>> for &Key<UnspecifiedParts, UnspecifiedRole>
impl From<&Key<PublicParts, PrimaryRole>> for &Key<UnspecifiedParts, UnspecifiedRole>
source§fn from(p: &Key<PublicParts, PrimaryRole>) -> Self
fn from(p: &Key<PublicParts, PrimaryRole>) -> Self
source§impl<R> From<&Key<PublicParts, R>> for &Key<UnspecifiedParts, R>where
R: KeyRole,
impl<R> From<&Key<PublicParts, R>> for &Key<UnspecifiedParts, R>where
R: KeyRole,
source§fn from(p: &Key<PublicParts, R>) -> Self
fn from(p: &Key<PublicParts, R>) -> Self
source§impl From<&Key<PublicParts, SubordinateRole>> for &Key<UnspecifiedParts, PrimaryRole>
impl From<&Key<PublicParts, SubordinateRole>> for &Key<UnspecifiedParts, PrimaryRole>
source§fn from(p: &Key<PublicParts, SubordinateRole>) -> Self
fn from(p: &Key<PublicParts, SubordinateRole>) -> Self
source§impl From<&Key<PublicParts, SubordinateRole>> for &Key<UnspecifiedParts, UnspecifiedRole>
impl From<&Key<PublicParts, SubordinateRole>> for &Key<UnspecifiedParts, UnspecifiedRole>
source§fn from(p: &Key<PublicParts, SubordinateRole>) -> Self
fn from(p: &Key<PublicParts, SubordinateRole>) -> Self
source§impl From<&Key<PublicParts, UnspecifiedRole>> for &Key<UnspecifiedParts, PrimaryRole>
impl From<&Key<PublicParts, UnspecifiedRole>> for &Key<UnspecifiedParts, PrimaryRole>
source§fn from(p: &Key<PublicParts, UnspecifiedRole>) -> Self
fn from(p: &Key<PublicParts, UnspecifiedRole>) -> Self
source§impl From<&Key<PublicParts, UnspecifiedRole>> for &Key<UnspecifiedParts, SubordinateRole>
impl From<&Key<PublicParts, UnspecifiedRole>> for &Key<UnspecifiedParts, SubordinateRole>
source§fn from(p: &Key<PublicParts, UnspecifiedRole>) -> Self
fn from(p: &Key<PublicParts, UnspecifiedRole>) -> Self
source§impl From<&Key<SecretParts, PrimaryRole>> for &Key<PublicParts, SubordinateRole>
impl From<&Key<SecretParts, PrimaryRole>> for &Key<PublicParts, SubordinateRole>
source§fn from(p: &Key<SecretParts, PrimaryRole>) -> Self
fn from(p: &Key<SecretParts, PrimaryRole>) -> Self
source§impl From<&Key<SecretParts, PrimaryRole>> for &Key<PublicParts, UnspecifiedRole>
impl From<&Key<SecretParts, PrimaryRole>> for &Key<PublicParts, UnspecifiedRole>
source§fn from(p: &Key<SecretParts, PrimaryRole>) -> Self
fn from(p: &Key<SecretParts, PrimaryRole>) -> Self
source§impl From<&Key<SecretParts, PrimaryRole>> for &Key<UnspecifiedParts, SubordinateRole>
impl From<&Key<SecretParts, PrimaryRole>> for &Key<UnspecifiedParts, SubordinateRole>
source§fn from(p: &Key<SecretParts, PrimaryRole>) -> Self
fn from(p: &Key<SecretParts, PrimaryRole>) -> Self
source§impl From<&Key<SecretParts, PrimaryRole>> for &Key<UnspecifiedParts, UnspecifiedRole>
impl From<&Key<SecretParts, PrimaryRole>> for &Key<UnspecifiedParts, UnspecifiedRole>
source§fn from(p: &Key<SecretParts, PrimaryRole>) -> Self
fn from(p: &Key<SecretParts, PrimaryRole>) -> Self
source§impl<R> From<&Key<SecretParts, R>> for &Key<PublicParts, R>where
R: KeyRole,
impl<R> From<&Key<SecretParts, R>> for &Key<PublicParts, R>where
R: KeyRole,
source§fn from(p: &Key<SecretParts, R>) -> Self
fn from(p: &Key<SecretParts, R>) -> Self
source§impl<R> From<&Key<SecretParts, R>> for &Key<UnspecifiedParts, R>where
R: KeyRole,
impl<R> From<&Key<SecretParts, R>> for &Key<UnspecifiedParts, R>where
R: KeyRole,
source§fn from(p: &Key<SecretParts, R>) -> Self
fn from(p: &Key<SecretParts, R>) -> Self
source§impl From<&Key<SecretParts, SubordinateRole>> for &Key<PublicParts, PrimaryRole>
impl From<&Key<SecretParts, SubordinateRole>> for &Key<PublicParts, PrimaryRole>
source§fn from(p: &Key<SecretParts, SubordinateRole>) -> Self
fn from(p: &Key<SecretParts, SubordinateRole>) -> Self
source§impl From<&Key<SecretParts, SubordinateRole>> for &Key<PublicParts, UnspecifiedRole>
impl From<&Key<SecretParts, SubordinateRole>> for &Key<PublicParts, UnspecifiedRole>
source§fn from(p: &Key<SecretParts, SubordinateRole>) -> Self
fn from(p: &Key<SecretParts, SubordinateRole>) -> Self
source§impl From<&Key<SecretParts, SubordinateRole>> for &Key<UnspecifiedParts, PrimaryRole>
impl From<&Key<SecretParts, SubordinateRole>> for &Key<UnspecifiedParts, PrimaryRole>
source§fn from(p: &Key<SecretParts, SubordinateRole>) -> Self
fn from(p: &Key<SecretParts, SubordinateRole>) -> Self
source§impl From<&Key<SecretParts, SubordinateRole>> for &Key<UnspecifiedParts, UnspecifiedRole>
impl From<&Key<SecretParts, SubordinateRole>> for &Key<UnspecifiedParts, UnspecifiedRole>
source§fn from(p: &Key<SecretParts, SubordinateRole>) -> Self
fn from(p: &Key<SecretParts, SubordinateRole>) -> Self
source§impl From<&Key<SecretParts, UnspecifiedRole>> for &Key<PublicParts, PrimaryRole>
impl From<&Key<SecretParts, UnspecifiedRole>> for &Key<PublicParts, PrimaryRole>
source§fn from(p: &Key<SecretParts, UnspecifiedRole>) -> Self
fn from(p: &Key<SecretParts, UnspecifiedRole>) -> Self
source§impl From<&Key<SecretParts, UnspecifiedRole>> for &Key<PublicParts, SubordinateRole>
impl From<&Key<SecretParts, UnspecifiedRole>> for &Key<PublicParts, SubordinateRole>
source§fn from(p: &Key<SecretParts, UnspecifiedRole>) -> Self
fn from(p: &Key<SecretParts, UnspecifiedRole>) -> Self
source§impl From<&Key<SecretParts, UnspecifiedRole>> for &Key<UnspecifiedParts, PrimaryRole>
impl From<&Key<SecretParts, UnspecifiedRole>> for &Key<UnspecifiedParts, PrimaryRole>
source§fn from(p: &Key<SecretParts, UnspecifiedRole>) -> Self
fn from(p: &Key<SecretParts, UnspecifiedRole>) -> Self
source§impl From<&Key<SecretParts, UnspecifiedRole>> for &Key<UnspecifiedParts, SubordinateRole>
impl From<&Key<SecretParts, UnspecifiedRole>> for &Key<UnspecifiedParts, SubordinateRole>
source§fn from(p: &Key<SecretParts, UnspecifiedRole>) -> Self
fn from(p: &Key<SecretParts, UnspecifiedRole>) -> Self
source§impl From<&Key<UnspecifiedParts, PrimaryRole>> for &Key<PublicParts, SubordinateRole>
impl From<&Key<UnspecifiedParts, PrimaryRole>> for &Key<PublicParts, SubordinateRole>
source§fn from(p: &Key<UnspecifiedParts, PrimaryRole>) -> Self
fn from(p: &Key<UnspecifiedParts, PrimaryRole>) -> Self
source§impl From<&Key<UnspecifiedParts, PrimaryRole>> for &Key<PublicParts, UnspecifiedRole>
impl From<&Key<UnspecifiedParts, PrimaryRole>> for &Key<PublicParts, UnspecifiedRole>
source§fn from(p: &Key<UnspecifiedParts, PrimaryRole>) -> Self
fn from(p: &Key<UnspecifiedParts, PrimaryRole>) -> Self
source§impl<R> From<&Key<UnspecifiedParts, R>> for &Key<PublicParts, R>where
R: KeyRole,
impl<R> From<&Key<UnspecifiedParts, R>> for &Key<PublicParts, R>where
R: KeyRole,
source§fn from(p: &Key<UnspecifiedParts, R>) -> Self
fn from(p: &Key<UnspecifiedParts, R>) -> Self
source§impl From<&Key<UnspecifiedParts, SubordinateRole>> for &Key<PublicParts, PrimaryRole>
impl From<&Key<UnspecifiedParts, SubordinateRole>> for &Key<PublicParts, PrimaryRole>
source§fn from(p: &Key<UnspecifiedParts, SubordinateRole>) -> Self
fn from(p: &Key<UnspecifiedParts, SubordinateRole>) -> Self
source§impl From<&Key<UnspecifiedParts, SubordinateRole>> for &Key<PublicParts, UnspecifiedRole>
impl From<&Key<UnspecifiedParts, SubordinateRole>> for &Key<PublicParts, UnspecifiedRole>
source§fn from(p: &Key<UnspecifiedParts, SubordinateRole>) -> Self
fn from(p: &Key<UnspecifiedParts, SubordinateRole>) -> Self
source§impl From<&Key<UnspecifiedParts, UnspecifiedRole>> for &Key<PublicParts, PrimaryRole>
impl From<&Key<UnspecifiedParts, UnspecifiedRole>> for &Key<PublicParts, PrimaryRole>
source§fn from(p: &Key<UnspecifiedParts, UnspecifiedRole>) -> Self
fn from(p: &Key<UnspecifiedParts, UnspecifiedRole>) -> Self
source§impl From<&Key<UnspecifiedParts, UnspecifiedRole>> for &Key<PublicParts, SubordinateRole>
impl From<&Key<UnspecifiedParts, UnspecifiedRole>> for &Key<PublicParts, SubordinateRole>
source§fn from(p: &Key<UnspecifiedParts, UnspecifiedRole>) -> Self
fn from(p: &Key<UnspecifiedParts, UnspecifiedRole>) -> Self
source§impl<P> From<&mut Key<P, PrimaryRole>> for &mut Key<P, SubordinateRole>where
P: KeyParts,
impl<P> From<&mut Key<P, PrimaryRole>> for &mut Key<P, SubordinateRole>where
P: KeyParts,
source§fn from(p: &mut Key<P, PrimaryRole>) -> Self
fn from(p: &mut Key<P, PrimaryRole>) -> Self
source§impl<P> From<&mut Key<P, PrimaryRole>> for &mut Key<P, UnspecifiedRole>where
P: KeyParts,
impl<P> From<&mut Key<P, PrimaryRole>> for &mut Key<P, UnspecifiedRole>where
P: KeyParts,
source§fn from(p: &mut Key<P, PrimaryRole>) -> Self
fn from(p: &mut Key<P, PrimaryRole>) -> Self
source§impl<P> From<&mut Key<P, SubordinateRole>> for &mut Key<P, PrimaryRole>where
P: KeyParts,
impl<P> From<&mut Key<P, SubordinateRole>> for &mut Key<P, PrimaryRole>where
P: KeyParts,
source§fn from(p: &mut Key<P, SubordinateRole>) -> Self
fn from(p: &mut Key<P, SubordinateRole>) -> Self
source§impl<P> From<&mut Key<P, SubordinateRole>> for &mut Key<P, UnspecifiedRole>where
P: KeyParts,
impl<P> From<&mut Key<P, SubordinateRole>> for &mut Key<P, UnspecifiedRole>where
P: KeyParts,
source§fn from(p: &mut Key<P, SubordinateRole>) -> Self
fn from(p: &mut Key<P, SubordinateRole>) -> Self
source§impl<P> From<&mut Key<P, UnspecifiedRole>> for &mut Key<P, PrimaryRole>where
P: KeyParts,
impl<P> From<&mut Key<P, UnspecifiedRole>> for &mut Key<P, PrimaryRole>where
P: KeyParts,
source§fn from(p: &mut Key<P, UnspecifiedRole>) -> Self
fn from(p: &mut Key<P, UnspecifiedRole>) -> Self
source§impl<P> From<&mut Key<P, UnspecifiedRole>> for &mut Key<P, SubordinateRole>where
P: KeyParts,
impl<P> From<&mut Key<P, UnspecifiedRole>> for &mut Key<P, SubordinateRole>where
P: KeyParts,
source§fn from(p: &mut Key<P, UnspecifiedRole>) -> Self
fn from(p: &mut Key<P, UnspecifiedRole>) -> Self
source§impl From<&mut Key<PublicParts, PrimaryRole>> for &mut Key<UnspecifiedParts, SubordinateRole>
impl From<&mut Key<PublicParts, PrimaryRole>> for &mut Key<UnspecifiedParts, SubordinateRole>
source§fn from(p: &mut Key<PublicParts, PrimaryRole>) -> Self
fn from(p: &mut Key<PublicParts, PrimaryRole>) -> Self
source§impl From<&mut Key<PublicParts, PrimaryRole>> for &mut Key<UnspecifiedParts, UnspecifiedRole>
impl From<&mut Key<PublicParts, PrimaryRole>> for &mut Key<UnspecifiedParts, UnspecifiedRole>
source§fn from(p: &mut Key<PublicParts, PrimaryRole>) -> Self
fn from(p: &mut Key<PublicParts, PrimaryRole>) -> Self
source§impl<R> From<&mut Key<PublicParts, R>> for &mut Key<UnspecifiedParts, R>where
R: KeyRole,
impl<R> From<&mut Key<PublicParts, R>> for &mut Key<UnspecifiedParts, R>where
R: KeyRole,
source§fn from(p: &mut Key<PublicParts, R>) -> Self
fn from(p: &mut Key<PublicParts, R>) -> Self
source§impl From<&mut Key<PublicParts, SubordinateRole>> for &mut Key<UnspecifiedParts, PrimaryRole>
impl From<&mut Key<PublicParts, SubordinateRole>> for &mut Key<UnspecifiedParts, PrimaryRole>
source§fn from(p: &mut Key<PublicParts, SubordinateRole>) -> Self
fn from(p: &mut Key<PublicParts, SubordinateRole>) -> Self
source§impl From<&mut Key<PublicParts, SubordinateRole>> for &mut Key<UnspecifiedParts, UnspecifiedRole>
impl From<&mut Key<PublicParts, SubordinateRole>> for &mut Key<UnspecifiedParts, UnspecifiedRole>
source§fn from(p: &mut Key<PublicParts, SubordinateRole>) -> Self
fn from(p: &mut Key<PublicParts, SubordinateRole>) -> Self
source§impl From<&mut Key<PublicParts, UnspecifiedRole>> for &mut Key<UnspecifiedParts, PrimaryRole>
impl From<&mut Key<PublicParts, UnspecifiedRole>> for &mut Key<UnspecifiedParts, PrimaryRole>
source§fn from(p: &mut Key<PublicParts, UnspecifiedRole>) -> Self
fn from(p: &mut Key<PublicParts, UnspecifiedRole>) -> Self
source§impl From<&mut Key<PublicParts, UnspecifiedRole>> for &mut Key<UnspecifiedParts, SubordinateRole>
impl From<&mut Key<PublicParts, UnspecifiedRole>> for &mut Key<UnspecifiedParts, SubordinateRole>
source§fn from(p: &mut Key<PublicParts, UnspecifiedRole>) -> Self
fn from(p: &mut Key<PublicParts, UnspecifiedRole>) -> Self
source§impl From<&mut Key<SecretParts, PrimaryRole>> for &mut Key<PublicParts, SubordinateRole>
impl From<&mut Key<SecretParts, PrimaryRole>> for &mut Key<PublicParts, SubordinateRole>
source§fn from(p: &mut Key<SecretParts, PrimaryRole>) -> Self
fn from(p: &mut Key<SecretParts, PrimaryRole>) -> Self
source§impl From<&mut Key<SecretParts, PrimaryRole>> for &mut Key<PublicParts, UnspecifiedRole>
impl From<&mut Key<SecretParts, PrimaryRole>> for &mut Key<PublicParts, UnspecifiedRole>
source§fn from(p: &mut Key<SecretParts, PrimaryRole>) -> Self
fn from(p: &mut Key<SecretParts, PrimaryRole>) -> Self
source§impl From<&mut Key<SecretParts, PrimaryRole>> for &mut Key<UnspecifiedParts, SubordinateRole>
impl From<&mut Key<SecretParts, PrimaryRole>> for &mut Key<UnspecifiedParts, SubordinateRole>
source§fn from(p: &mut Key<SecretParts, PrimaryRole>) -> Self
fn from(p: &mut Key<SecretParts, PrimaryRole>) -> Self
source§impl From<&mut Key<SecretParts, PrimaryRole>> for &mut Key<UnspecifiedParts, UnspecifiedRole>
impl From<&mut Key<SecretParts, PrimaryRole>> for &mut Key<UnspecifiedParts, UnspecifiedRole>
source§fn from(p: &mut Key<SecretParts, PrimaryRole>) -> Self
fn from(p: &mut Key<SecretParts, PrimaryRole>) -> Self
source§impl<R> From<&mut Key<SecretParts, R>> for &mut Key<PublicParts, R>where
R: KeyRole,
impl<R> From<&mut Key<SecretParts, R>> for &mut Key<PublicParts, R>where
R: KeyRole,
source§fn from(p: &mut Key<SecretParts, R>) -> Self
fn from(p: &mut Key<SecretParts, R>) -> Self
source§impl<R> From<&mut Key<SecretParts, R>> for &mut Key<UnspecifiedParts, R>where
R: KeyRole,
impl<R> From<&mut Key<SecretParts, R>> for &mut Key<UnspecifiedParts, R>where
R: KeyRole,
source§fn from(p: &mut Key<SecretParts, R>) -> Self
fn from(p: &mut Key<SecretParts, R>) -> Self
source§impl From<&mut Key<SecretParts, SubordinateRole>> for &mut Key<PublicParts, PrimaryRole>
impl From<&mut Key<SecretParts, SubordinateRole>> for &mut Key<PublicParts, PrimaryRole>
source§fn from(p: &mut Key<SecretParts, SubordinateRole>) -> Self
fn from(p: &mut Key<SecretParts, SubordinateRole>) -> Self
source§impl From<&mut Key<SecretParts, SubordinateRole>> for &mut Key<PublicParts, UnspecifiedRole>
impl From<&mut Key<SecretParts, SubordinateRole>> for &mut Key<PublicParts, UnspecifiedRole>
source§fn from(p: &mut Key<SecretParts, SubordinateRole>) -> Self
fn from(p: &mut Key<SecretParts, SubordinateRole>) -> Self
source§impl From<&mut Key<SecretParts, SubordinateRole>> for &mut Key<UnspecifiedParts, PrimaryRole>
impl From<&mut Key<SecretParts, SubordinateRole>> for &mut Key<UnspecifiedParts, PrimaryRole>
source§fn from(p: &mut Key<SecretParts, SubordinateRole>) -> Self
fn from(p: &mut Key<SecretParts, SubordinateRole>) -> Self
source§impl From<&mut Key<SecretParts, SubordinateRole>> for &mut Key<UnspecifiedParts, UnspecifiedRole>
impl From<&mut Key<SecretParts, SubordinateRole>> for &mut Key<UnspecifiedParts, UnspecifiedRole>
source§fn from(p: &mut Key<SecretParts, SubordinateRole>) -> Self
fn from(p: &mut Key<SecretParts, SubordinateRole>) -> Self
source§impl From<&mut Key<SecretParts, UnspecifiedRole>> for &mut Key<PublicParts, PrimaryRole>
impl From<&mut Key<SecretParts, UnspecifiedRole>> for &mut Key<PublicParts, PrimaryRole>
source§fn from(p: &mut Key<SecretParts, UnspecifiedRole>) -> Self
fn from(p: &mut Key<SecretParts, UnspecifiedRole>) -> Self
source§impl From<&mut Key<SecretParts, UnspecifiedRole>> for &mut Key<PublicParts, SubordinateRole>
impl From<&mut Key<SecretParts, UnspecifiedRole>> for &mut Key<PublicParts, SubordinateRole>
source§fn from(p: &mut Key<SecretParts, UnspecifiedRole>) -> Self
fn from(p: &mut Key<SecretParts, UnspecifiedRole>) -> Self
source§impl From<&mut Key<SecretParts, UnspecifiedRole>> for &mut Key<UnspecifiedParts, PrimaryRole>
impl From<&mut Key<SecretParts, UnspecifiedRole>> for &mut Key<UnspecifiedParts, PrimaryRole>
source§fn from(p: &mut Key<SecretParts, UnspecifiedRole>) -> Self
fn from(p: &mut Key<SecretParts, UnspecifiedRole>) -> Self
source§impl From<&mut Key<SecretParts, UnspecifiedRole>> for &mut Key<UnspecifiedParts, SubordinateRole>
impl From<&mut Key<SecretParts, UnspecifiedRole>> for &mut Key<UnspecifiedParts, SubordinateRole>
source§fn from(p: &mut Key<SecretParts, UnspecifiedRole>) -> Self
fn from(p: &mut Key<SecretParts, UnspecifiedRole>) -> Self
source§impl From<&mut Key<UnspecifiedParts, PrimaryRole>> for &mut Key<PublicParts, SubordinateRole>
impl From<&mut Key<UnspecifiedParts, PrimaryRole>> for &mut Key<PublicParts, SubordinateRole>
source§fn from(p: &mut Key<UnspecifiedParts, PrimaryRole>) -> Self
fn from(p: &mut Key<UnspecifiedParts, PrimaryRole>) -> Self
source§impl From<&mut Key<UnspecifiedParts, PrimaryRole>> for &mut Key<PublicParts, UnspecifiedRole>
impl From<&mut Key<UnspecifiedParts, PrimaryRole>> for &mut Key<PublicParts, UnspecifiedRole>
source§fn from(p: &mut Key<UnspecifiedParts, PrimaryRole>) -> Self
fn from(p: &mut Key<UnspecifiedParts, PrimaryRole>) -> Self
source§impl<R> From<&mut Key<UnspecifiedParts, R>> for &mut Key<PublicParts, R>where
R: KeyRole,
impl<R> From<&mut Key<UnspecifiedParts, R>> for &mut Key<PublicParts, R>where
R: KeyRole,
source§fn from(p: &mut Key<UnspecifiedParts, R>) -> Self
fn from(p: &mut Key<UnspecifiedParts, R>) -> Self
source§impl From<&mut Key<UnspecifiedParts, SubordinateRole>> for &mut Key<PublicParts, PrimaryRole>
impl From<&mut Key<UnspecifiedParts, SubordinateRole>> for &mut Key<PublicParts, PrimaryRole>
source§fn from(p: &mut Key<UnspecifiedParts, SubordinateRole>) -> Self
fn from(p: &mut Key<UnspecifiedParts, SubordinateRole>) -> Self
source§impl From<&mut Key<UnspecifiedParts, SubordinateRole>> for &mut Key<PublicParts, UnspecifiedRole>
impl From<&mut Key<UnspecifiedParts, SubordinateRole>> for &mut Key<PublicParts, UnspecifiedRole>
source§fn from(p: &mut Key<UnspecifiedParts, SubordinateRole>) -> Self
fn from(p: &mut Key<UnspecifiedParts, SubordinateRole>) -> Self
source§impl From<&mut Key<UnspecifiedParts, UnspecifiedRole>> for &mut Key<PublicParts, PrimaryRole>
impl From<&mut Key<UnspecifiedParts, UnspecifiedRole>> for &mut Key<PublicParts, PrimaryRole>
source§fn from(p: &mut Key<UnspecifiedParts, UnspecifiedRole>) -> Self
fn from(p: &mut Key<UnspecifiedParts, UnspecifiedRole>) -> Self
source§impl From<&mut Key<UnspecifiedParts, UnspecifiedRole>> for &mut Key<PublicParts, SubordinateRole>
impl From<&mut Key<UnspecifiedParts, UnspecifiedRole>> for &mut Key<PublicParts, SubordinateRole>
source§fn from(p: &mut Key<UnspecifiedParts, UnspecifiedRole>) -> Self
fn from(p: &mut Key<UnspecifiedParts, UnspecifiedRole>) -> Self
source§impl<P> From<Key<P, PrimaryRole>> for Key<P, SubordinateRole>where
P: KeyParts,
impl<P> From<Key<P, PrimaryRole>> for Key<P, SubordinateRole>where
P: KeyParts,
source§fn from(p: Key<P, PrimaryRole>) -> Self
fn from(p: Key<P, PrimaryRole>) -> Self
source§impl<P> From<Key<P, PrimaryRole>> for Key<P, UnspecifiedRole>where
P: KeyParts,
impl<P> From<Key<P, PrimaryRole>> for Key<P, UnspecifiedRole>where
P: KeyParts,
source§fn from(p: Key<P, PrimaryRole>) -> Self
fn from(p: Key<P, PrimaryRole>) -> Self
source§impl<P> From<Key<P, SubordinateRole>> for Key<P, PrimaryRole>where
P: KeyParts,
impl<P> From<Key<P, SubordinateRole>> for Key<P, PrimaryRole>where
P: KeyParts,
source§fn from(p: Key<P, SubordinateRole>) -> Self
fn from(p: Key<P, SubordinateRole>) -> Self
source§impl<P> From<Key<P, SubordinateRole>> for Key<P, UnspecifiedRole>where
P: KeyParts,
impl<P> From<Key<P, SubordinateRole>> for Key<P, UnspecifiedRole>where
P: KeyParts,
source§fn from(p: Key<P, SubordinateRole>) -> Self
fn from(p: Key<P, SubordinateRole>) -> Self
source§impl<P> From<Key<P, UnspecifiedRole>> for Key<P, PrimaryRole>where
P: KeyParts,
impl<P> From<Key<P, UnspecifiedRole>> for Key<P, PrimaryRole>where
P: KeyParts,
source§fn from(p: Key<P, UnspecifiedRole>) -> Self
fn from(p: Key<P, UnspecifiedRole>) -> Self
source§impl<P> From<Key<P, UnspecifiedRole>> for Key<P, SubordinateRole>where
P: KeyParts,
impl<P> From<Key<P, UnspecifiedRole>> for Key<P, SubordinateRole>where
P: KeyParts,
source§fn from(p: Key<P, UnspecifiedRole>) -> Self
fn from(p: Key<P, UnspecifiedRole>) -> Self
source§impl From<Key<PublicParts, PrimaryRole>> for Key<UnspecifiedParts, SubordinateRole>
impl From<Key<PublicParts, PrimaryRole>> for Key<UnspecifiedParts, SubordinateRole>
source§fn from(p: Key<PublicParts, PrimaryRole>) -> Self
fn from(p: Key<PublicParts, PrimaryRole>) -> Self
source§impl From<Key<PublicParts, PrimaryRole>> for Key<UnspecifiedParts, UnspecifiedRole>
impl From<Key<PublicParts, PrimaryRole>> for Key<UnspecifiedParts, UnspecifiedRole>
source§fn from(p: Key<PublicParts, PrimaryRole>) -> Self
fn from(p: Key<PublicParts, PrimaryRole>) -> Self
source§impl From<Key<PublicParts, PrimaryRole>> for Packet
impl From<Key<PublicParts, PrimaryRole>> for Packet
source§fn from(k: Key<PublicParts, PrimaryRole>) -> Self
fn from(k: Key<PublicParts, PrimaryRole>) -> Self
Convert the Key
struct to a Packet
.
source§impl<R> From<Key<PublicParts, R>> for Key<UnspecifiedParts, R>where
R: KeyRole,
impl<R> From<Key<PublicParts, R>> for Key<UnspecifiedParts, R>where
R: KeyRole,
source§fn from(p: Key<PublicParts, R>) -> Self
fn from(p: Key<PublicParts, R>) -> Self
source§impl From<Key<PublicParts, SubordinateRole>> for Key<UnspecifiedParts, PrimaryRole>
impl From<Key<PublicParts, SubordinateRole>> for Key<UnspecifiedParts, PrimaryRole>
source§fn from(p: Key<PublicParts, SubordinateRole>) -> Self
fn from(p: Key<PublicParts, SubordinateRole>) -> Self
source§impl From<Key<PublicParts, SubordinateRole>> for Key<UnspecifiedParts, UnspecifiedRole>
impl From<Key<PublicParts, SubordinateRole>> for Key<UnspecifiedParts, UnspecifiedRole>
source§fn from(p: Key<PublicParts, SubordinateRole>) -> Self
fn from(p: Key<PublicParts, SubordinateRole>) -> Self
source§impl From<Key<PublicParts, SubordinateRole>> for Packet
impl From<Key<PublicParts, SubordinateRole>> for Packet
source§fn from(k: Key<PublicParts, SubordinateRole>) -> Self
fn from(k: Key<PublicParts, SubordinateRole>) -> Self
Convert the Key
struct to a Packet
.
source§impl From<Key<PublicParts, UnspecifiedRole>> for Key<UnspecifiedParts, PrimaryRole>
impl From<Key<PublicParts, UnspecifiedRole>> for Key<UnspecifiedParts, PrimaryRole>
source§fn from(p: Key<PublicParts, UnspecifiedRole>) -> Self
fn from(p: Key<PublicParts, UnspecifiedRole>) -> Self
source§impl From<Key<PublicParts, UnspecifiedRole>> for Key<UnspecifiedParts, SubordinateRole>
impl From<Key<PublicParts, UnspecifiedRole>> for Key<UnspecifiedParts, SubordinateRole>
source§fn from(p: Key<PublicParts, UnspecifiedRole>) -> Self
fn from(p: Key<PublicParts, UnspecifiedRole>) -> Self
source§impl From<Key<SecretParts, PrimaryRole>> for Key<PublicParts, SubordinateRole>
impl From<Key<SecretParts, PrimaryRole>> for Key<PublicParts, SubordinateRole>
source§fn from(p: Key<SecretParts, PrimaryRole>) -> Self
fn from(p: Key<SecretParts, PrimaryRole>) -> Self
source§impl From<Key<SecretParts, PrimaryRole>> for Key<PublicParts, UnspecifiedRole>
impl From<Key<SecretParts, PrimaryRole>> for Key<PublicParts, UnspecifiedRole>
source§fn from(p: Key<SecretParts, PrimaryRole>) -> Self
fn from(p: Key<SecretParts, PrimaryRole>) -> Self
source§impl From<Key<SecretParts, PrimaryRole>> for Key<UnspecifiedParts, SubordinateRole>
impl From<Key<SecretParts, PrimaryRole>> for Key<UnspecifiedParts, SubordinateRole>
source§fn from(p: Key<SecretParts, PrimaryRole>) -> Self
fn from(p: Key<SecretParts, PrimaryRole>) -> Self
source§impl From<Key<SecretParts, PrimaryRole>> for Key<UnspecifiedParts, UnspecifiedRole>
impl From<Key<SecretParts, PrimaryRole>> for Key<UnspecifiedParts, UnspecifiedRole>
source§fn from(p: Key<SecretParts, PrimaryRole>) -> Self
fn from(p: Key<SecretParts, PrimaryRole>) -> Self
source§impl From<Key<SecretParts, PrimaryRole>> for Packet
impl From<Key<SecretParts, PrimaryRole>> for Packet
source§fn from(k: Key<SecretParts, PrimaryRole>) -> Self
fn from(k: Key<SecretParts, PrimaryRole>) -> Self
Convert the Key
struct to a Packet
.
source§impl<R> From<Key<SecretParts, R>> for Key<PublicParts, R>where
R: KeyRole,
impl<R> From<Key<SecretParts, R>> for Key<PublicParts, R>where
R: KeyRole,
source§fn from(p: Key<SecretParts, R>) -> Self
fn from(p: Key<SecretParts, R>) -> Self
source§impl<R> From<Key<SecretParts, R>> for Key<UnspecifiedParts, R>where
R: KeyRole,
impl<R> From<Key<SecretParts, R>> for Key<UnspecifiedParts, R>where
R: KeyRole,
source§fn from(p: Key<SecretParts, R>) -> Self
fn from(p: Key<SecretParts, R>) -> Self
source§impl From<Key<SecretParts, SubordinateRole>> for Key<PublicParts, PrimaryRole>
impl From<Key<SecretParts, SubordinateRole>> for Key<PublicParts, PrimaryRole>
source§fn from(p: Key<SecretParts, SubordinateRole>) -> Self
fn from(p: Key<SecretParts, SubordinateRole>) -> Self
source§impl From<Key<SecretParts, SubordinateRole>> for Key<PublicParts, UnspecifiedRole>
impl From<Key<SecretParts, SubordinateRole>> for Key<PublicParts, UnspecifiedRole>
source§fn from(p: Key<SecretParts, SubordinateRole>) -> Self
fn from(p: Key<SecretParts, SubordinateRole>) -> Self
source§impl From<Key<SecretParts, SubordinateRole>> for Key<UnspecifiedParts, PrimaryRole>
impl From<Key<SecretParts, SubordinateRole>> for Key<UnspecifiedParts, PrimaryRole>
source§fn from(p: Key<SecretParts, SubordinateRole>) -> Self
fn from(p: Key<SecretParts, SubordinateRole>) -> Self
source§impl From<Key<SecretParts, SubordinateRole>> for Key<UnspecifiedParts, UnspecifiedRole>
impl From<Key<SecretParts, SubordinateRole>> for Key<UnspecifiedParts, UnspecifiedRole>
source§fn from(p: Key<SecretParts, SubordinateRole>) -> Self
fn from(p: Key<SecretParts, SubordinateRole>) -> Self
source§impl From<Key<SecretParts, SubordinateRole>> for Packet
impl From<Key<SecretParts, SubordinateRole>> for Packet
source§fn from(k: Key<SecretParts, SubordinateRole>) -> Self
fn from(k: Key<SecretParts, SubordinateRole>) -> Self
Convert the Key
struct to a Packet
.
source§impl From<Key<SecretParts, UnspecifiedRole>> for Key<PublicParts, PrimaryRole>
impl From<Key<SecretParts, UnspecifiedRole>> for Key<PublicParts, PrimaryRole>
source§fn from(p: Key<SecretParts, UnspecifiedRole>) -> Self
fn from(p: Key<SecretParts, UnspecifiedRole>) -> Self
source§impl From<Key<SecretParts, UnspecifiedRole>> for Key<PublicParts, SubordinateRole>
impl From<Key<SecretParts, UnspecifiedRole>> for Key<PublicParts, SubordinateRole>
source§fn from(p: Key<SecretParts, UnspecifiedRole>) -> Self
fn from(p: Key<SecretParts, UnspecifiedRole>) -> Self
source§impl From<Key<SecretParts, UnspecifiedRole>> for Key<UnspecifiedParts, PrimaryRole>
impl From<Key<SecretParts, UnspecifiedRole>> for Key<UnspecifiedParts, PrimaryRole>
source§fn from(p: Key<SecretParts, UnspecifiedRole>) -> Self
fn from(p: Key<SecretParts, UnspecifiedRole>) -> Self
source§impl From<Key<SecretParts, UnspecifiedRole>> for Key<UnspecifiedParts, SubordinateRole>
impl From<Key<SecretParts, UnspecifiedRole>> for Key<UnspecifiedParts, SubordinateRole>
source§fn from(p: Key<SecretParts, UnspecifiedRole>) -> Self
fn from(p: Key<SecretParts, UnspecifiedRole>) -> Self
source§impl From<Key<UnspecifiedParts, PrimaryRole>> for Key<PublicParts, SubordinateRole>
impl From<Key<UnspecifiedParts, PrimaryRole>> for Key<PublicParts, SubordinateRole>
source§fn from(p: Key<UnspecifiedParts, PrimaryRole>) -> Self
fn from(p: Key<UnspecifiedParts, PrimaryRole>) -> Self
source§impl From<Key<UnspecifiedParts, PrimaryRole>> for Key<PublicParts, UnspecifiedRole>
impl From<Key<UnspecifiedParts, PrimaryRole>> for Key<PublicParts, UnspecifiedRole>
source§fn from(p: Key<UnspecifiedParts, PrimaryRole>) -> Self
fn from(p: Key<UnspecifiedParts, PrimaryRole>) -> Self
source§impl<R> From<Key<UnspecifiedParts, R>> for Key<PublicParts, R>where
R: KeyRole,
impl<R> From<Key<UnspecifiedParts, R>> for Key<PublicParts, R>where
R: KeyRole,
source§fn from(p: Key<UnspecifiedParts, R>) -> Self
fn from(p: Key<UnspecifiedParts, R>) -> Self
source§impl From<Key<UnspecifiedParts, SubordinateRole>> for Key<PublicParts, PrimaryRole>
impl From<Key<UnspecifiedParts, SubordinateRole>> for Key<PublicParts, PrimaryRole>
source§fn from(p: Key<UnspecifiedParts, SubordinateRole>) -> Self
fn from(p: Key<UnspecifiedParts, SubordinateRole>) -> Self
source§impl From<Key<UnspecifiedParts, SubordinateRole>> for Key<PublicParts, UnspecifiedRole>
impl From<Key<UnspecifiedParts, SubordinateRole>> for Key<PublicParts, UnspecifiedRole>
source§fn from(p: Key<UnspecifiedParts, SubordinateRole>) -> Self
fn from(p: Key<UnspecifiedParts, SubordinateRole>) -> Self
source§impl From<Key<UnspecifiedParts, UnspecifiedRole>> for Key<PublicParts, PrimaryRole>
impl From<Key<UnspecifiedParts, UnspecifiedRole>> for Key<PublicParts, PrimaryRole>
source§fn from(p: Key<UnspecifiedParts, UnspecifiedRole>) -> Self
fn from(p: Key<UnspecifiedParts, UnspecifiedRole>) -> Self
source§impl From<Key<UnspecifiedParts, UnspecifiedRole>> for Key<PublicParts, SubordinateRole>
impl From<Key<UnspecifiedParts, UnspecifiedRole>> for Key<PublicParts, SubordinateRole>
source§fn from(p: Key<UnspecifiedParts, UnspecifiedRole>) -> Self
fn from(p: Key<UnspecifiedParts, UnspecifiedRole>) -> Self
source§impl From<KeyPair> for Key<SecretParts, UnspecifiedRole>
impl From<KeyPair> for Key<SecretParts, UnspecifiedRole>
source§impl<P, R> IntoIterator for Key<P, R>
impl<P, R> IntoIterator for Key<P, R>
Implement IntoIterator
so that
cert::insert_packets(sig)
just works.
source§impl<P: KeyParts, R: KeyRole> MarshalInto for Key<P, R>
impl<P: KeyParts, R: KeyRole> MarshalInto for Key<P, R>
source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
source§fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
source§impl<'a> Parse<'a, Key<UnspecifiedParts, UnspecifiedRole>> for Key<UnspecifiedParts, UnspecifiedRole>
impl<'a> Parse<'a, Key<UnspecifiedParts, UnspecifiedRole>> for Key<UnspecifiedParts, UnspecifiedRole>
source§fn from_buffered_reader<R>(reader: R) -> Result<Self>where
R: BufferedReader<Cookie> + 'a,
fn from_buffered_reader<R>(reader: R) -> Result<Self>where
R: BufferedReader<Cookie> + 'a,
source§fn from_reader<R: 'a + Read + Send + Sync>(reader: R) -> Result<Self>
fn from_reader<R: 'a + Read + Send + Sync>(reader: R) -> Result<Self>
source§impl<P: PartialEq + KeyParts, R: PartialEq + KeyRole> PartialEq for Key<P, R>
impl<P: PartialEq + KeyParts, R: PartialEq + KeyRole> PartialEq for Key<P, R>
source§impl TryFrom<&Key<PublicParts, PrimaryRole>> for &Key<SecretParts, SubordinateRole>
impl TryFrom<&Key<PublicParts, PrimaryRole>> for &Key<SecretParts, SubordinateRole>
source§fn try_from(p: &Key<PublicParts, PrimaryRole>) -> Result<Self>
fn try_from(p: &Key<PublicParts, PrimaryRole>) -> Result<Self>
source§impl TryFrom<&Key<PublicParts, PrimaryRole>> for &Key<SecretParts, UnspecifiedRole>
impl TryFrom<&Key<PublicParts, PrimaryRole>> for &Key<SecretParts, UnspecifiedRole>
source§fn try_from(p: &Key<PublicParts, PrimaryRole>) -> Result<Self>
fn try_from(p: &Key<PublicParts, PrimaryRole>) -> Result<Self>
source§impl<R> TryFrom<&Key<PublicParts, R>> for &Key<SecretParts, R>where
R: KeyRole,
impl<R> TryFrom<&Key<PublicParts, R>> for &Key<SecretParts, R>where
R: KeyRole,
source§impl TryFrom<&Key<PublicParts, SubordinateRole>> for &Key<SecretParts, PrimaryRole>
impl TryFrom<&Key<PublicParts, SubordinateRole>> for &Key<SecretParts, PrimaryRole>
source§fn try_from(p: &Key<PublicParts, SubordinateRole>) -> Result<Self>
fn try_from(p: &Key<PublicParts, SubordinateRole>) -> Result<Self>
source§impl TryFrom<&Key<PublicParts, SubordinateRole>> for &Key<SecretParts, UnspecifiedRole>
impl TryFrom<&Key<PublicParts, SubordinateRole>> for &Key<SecretParts, UnspecifiedRole>
source§fn try_from(p: &Key<PublicParts, SubordinateRole>) -> Result<Self>
fn try_from(p: &Key<PublicParts, SubordinateRole>) -> Result<Self>
source§impl TryFrom<&Key<PublicParts, UnspecifiedRole>> for &Key<SecretParts, PrimaryRole>
impl TryFrom<&Key<PublicParts, UnspecifiedRole>> for &Key<SecretParts, PrimaryRole>
source§fn try_from(p: &Key<PublicParts, UnspecifiedRole>) -> Result<Self>
fn try_from(p: &Key<PublicParts, UnspecifiedRole>) -> Result<Self>
source§impl TryFrom<&Key<PublicParts, UnspecifiedRole>> for &Key<SecretParts, SubordinateRole>
impl TryFrom<&Key<PublicParts, UnspecifiedRole>> for &Key<SecretParts, SubordinateRole>
source§fn try_from(p: &Key<PublicParts, UnspecifiedRole>) -> Result<Self>
fn try_from(p: &Key<PublicParts, UnspecifiedRole>) -> Result<Self>
source§impl TryFrom<&Key<UnspecifiedParts, PrimaryRole>> for &Key<SecretParts, SubordinateRole>
impl TryFrom<&Key<UnspecifiedParts, PrimaryRole>> for &Key<SecretParts, SubordinateRole>
source§fn try_from(p: &Key<UnspecifiedParts, PrimaryRole>) -> Result<Self>
fn try_from(p: &Key<UnspecifiedParts, PrimaryRole>) -> Result<Self>
source§impl TryFrom<&Key<UnspecifiedParts, PrimaryRole>> for &Key<SecretParts, UnspecifiedRole>
impl TryFrom<&Key<UnspecifiedParts, PrimaryRole>> for &Key<SecretParts, UnspecifiedRole>
source§fn try_from(p: &Key<UnspecifiedParts, PrimaryRole>) -> Result<Self>
fn try_from(p: &Key<UnspecifiedParts, PrimaryRole>) -> Result<Self>
source§impl<R> TryFrom<&Key<UnspecifiedParts, R>> for &Key<SecretParts, R>where
R: KeyRole,
impl<R> TryFrom<&Key<UnspecifiedParts, R>> for &Key<SecretParts, R>where
R: KeyRole,
source§impl TryFrom<&Key<UnspecifiedParts, SubordinateRole>> for &Key<SecretParts, PrimaryRole>
impl TryFrom<&Key<UnspecifiedParts, SubordinateRole>> for &Key<SecretParts, PrimaryRole>
source§fn try_from(p: &Key<UnspecifiedParts, SubordinateRole>) -> Result<Self>
fn try_from(p: &Key<UnspecifiedParts, SubordinateRole>) -> Result<Self>
source§impl TryFrom<&Key<UnspecifiedParts, SubordinateRole>> for &Key<SecretParts, UnspecifiedRole>
impl TryFrom<&Key<UnspecifiedParts, SubordinateRole>> for &Key<SecretParts, UnspecifiedRole>
source§fn try_from(p: &Key<UnspecifiedParts, SubordinateRole>) -> Result<Self>
fn try_from(p: &Key<UnspecifiedParts, SubordinateRole>) -> Result<Self>
source§impl TryFrom<&Key<UnspecifiedParts, UnspecifiedRole>> for &Key<SecretParts, PrimaryRole>
impl TryFrom<&Key<UnspecifiedParts, UnspecifiedRole>> for &Key<SecretParts, PrimaryRole>
source§fn try_from(p: &Key<UnspecifiedParts, UnspecifiedRole>) -> Result<Self>
fn try_from(p: &Key<UnspecifiedParts, UnspecifiedRole>) -> Result<Self>
source§impl TryFrom<&Key<UnspecifiedParts, UnspecifiedRole>> for &Key<SecretParts, SubordinateRole>
impl TryFrom<&Key<UnspecifiedParts, UnspecifiedRole>> for &Key<SecretParts, SubordinateRole>
source§fn try_from(p: &Key<UnspecifiedParts, UnspecifiedRole>) -> Result<Self>
fn try_from(p: &Key<UnspecifiedParts, UnspecifiedRole>) -> Result<Self>
source§impl TryFrom<&mut Key<PublicParts, PrimaryRole>> for &mut Key<SecretParts, SubordinateRole>
impl TryFrom<&mut Key<PublicParts, PrimaryRole>> for &mut Key<SecretParts, SubordinateRole>
source§fn try_from(p: &mut Key<PublicParts, PrimaryRole>) -> Result<Self>
fn try_from(p: &mut Key<PublicParts, PrimaryRole>) -> Result<Self>
source§impl TryFrom<&mut Key<PublicParts, PrimaryRole>> for &mut Key<SecretParts, UnspecifiedRole>
impl TryFrom<&mut Key<PublicParts, PrimaryRole>> for &mut Key<SecretParts, UnspecifiedRole>
source§fn try_from(p: &mut Key<PublicParts, PrimaryRole>) -> Result<Self>
fn try_from(p: &mut Key<PublicParts, PrimaryRole>) -> Result<Self>
source§impl<R> TryFrom<&mut Key<PublicParts, R>> for &mut Key<SecretParts, R>where
R: KeyRole,
impl<R> TryFrom<&mut Key<PublicParts, R>> for &mut Key<SecretParts, R>where
R: KeyRole,
source§impl TryFrom<&mut Key<PublicParts, SubordinateRole>> for &mut Key<SecretParts, PrimaryRole>
impl TryFrom<&mut Key<PublicParts, SubordinateRole>> for &mut Key<SecretParts, PrimaryRole>
source§fn try_from(p: &mut Key<PublicParts, SubordinateRole>) -> Result<Self>
fn try_from(p: &mut Key<PublicParts, SubordinateRole>) -> Result<Self>
source§impl TryFrom<&mut Key<PublicParts, SubordinateRole>> for &mut Key<SecretParts, UnspecifiedRole>
impl TryFrom<&mut Key<PublicParts, SubordinateRole>> for &mut Key<SecretParts, UnspecifiedRole>
source§fn try_from(p: &mut Key<PublicParts, SubordinateRole>) -> Result<Self>
fn try_from(p: &mut Key<PublicParts, SubordinateRole>) -> Result<Self>
source§impl TryFrom<&mut Key<PublicParts, UnspecifiedRole>> for &mut Key<SecretParts, PrimaryRole>
impl TryFrom<&mut Key<PublicParts, UnspecifiedRole>> for &mut Key<SecretParts, PrimaryRole>
source§fn try_from(p: &mut Key<PublicParts, UnspecifiedRole>) -> Result<Self>
fn try_from(p: &mut Key<PublicParts, UnspecifiedRole>) -> Result<Self>
source§impl TryFrom<&mut Key<PublicParts, UnspecifiedRole>> for &mut Key<SecretParts, SubordinateRole>
impl TryFrom<&mut Key<PublicParts, UnspecifiedRole>> for &mut Key<SecretParts, SubordinateRole>
source§fn try_from(p: &mut Key<PublicParts, UnspecifiedRole>) -> Result<Self>
fn try_from(p: &mut Key<PublicParts, UnspecifiedRole>) -> Result<Self>
source§impl TryFrom<&mut Key<UnspecifiedParts, PrimaryRole>> for &mut Key<SecretParts, SubordinateRole>
impl TryFrom<&mut Key<UnspecifiedParts, PrimaryRole>> for &mut Key<SecretParts, SubordinateRole>
source§fn try_from(p: &mut Key<UnspecifiedParts, PrimaryRole>) -> Result<Self>
fn try_from(p: &mut Key<UnspecifiedParts, PrimaryRole>) -> Result<Self>
source§impl TryFrom<&mut Key<UnspecifiedParts, PrimaryRole>> for &mut Key<SecretParts, UnspecifiedRole>
impl TryFrom<&mut Key<UnspecifiedParts, PrimaryRole>> for &mut Key<SecretParts, UnspecifiedRole>
source§fn try_from(p: &mut Key<UnspecifiedParts, PrimaryRole>) -> Result<Self>
fn try_from(p: &mut Key<UnspecifiedParts, PrimaryRole>) -> Result<Self>
source§impl<R> TryFrom<&mut Key<UnspecifiedParts, R>> for &mut Key<SecretParts, R>where
R: KeyRole,
impl<R> TryFrom<&mut Key<UnspecifiedParts, R>> for &mut Key<SecretParts, R>where
R: KeyRole,
source§impl TryFrom<&mut Key<UnspecifiedParts, SubordinateRole>> for &mut Key<SecretParts, PrimaryRole>
impl TryFrom<&mut Key<UnspecifiedParts, SubordinateRole>> for &mut Key<SecretParts, PrimaryRole>
source§fn try_from(p: &mut Key<UnspecifiedParts, SubordinateRole>) -> Result<Self>
fn try_from(p: &mut Key<UnspecifiedParts, SubordinateRole>) -> Result<Self>
source§impl TryFrom<&mut Key<UnspecifiedParts, SubordinateRole>> for &mut Key<SecretParts, UnspecifiedRole>
impl TryFrom<&mut Key<UnspecifiedParts, SubordinateRole>> for &mut Key<SecretParts, UnspecifiedRole>
source§fn try_from(p: &mut Key<UnspecifiedParts, SubordinateRole>) -> Result<Self>
fn try_from(p: &mut Key<UnspecifiedParts, SubordinateRole>) -> Result<Self>
source§impl TryFrom<&mut Key<UnspecifiedParts, UnspecifiedRole>> for &mut Key<SecretParts, PrimaryRole>
impl TryFrom<&mut Key<UnspecifiedParts, UnspecifiedRole>> for &mut Key<SecretParts, PrimaryRole>
source§fn try_from(p: &mut Key<UnspecifiedParts, UnspecifiedRole>) -> Result<Self>
fn try_from(p: &mut Key<UnspecifiedParts, UnspecifiedRole>) -> Result<Self>
source§impl TryFrom<&mut Key<UnspecifiedParts, UnspecifiedRole>> for &mut Key<SecretParts, SubordinateRole>
impl TryFrom<&mut Key<UnspecifiedParts, UnspecifiedRole>> for &mut Key<SecretParts, SubordinateRole>
source§fn try_from(p: &mut Key<UnspecifiedParts, UnspecifiedRole>) -> Result<Self>
fn try_from(p: &mut Key<UnspecifiedParts, UnspecifiedRole>) -> Result<Self>
source§impl TryFrom<Key<PublicParts, PrimaryRole>> for Key<SecretParts, SubordinateRole>
impl TryFrom<Key<PublicParts, PrimaryRole>> for Key<SecretParts, SubordinateRole>
source§fn try_from(p: Key<PublicParts, PrimaryRole>) -> Result<Self>
fn try_from(p: Key<PublicParts, PrimaryRole>) -> Result<Self>
source§impl TryFrom<Key<PublicParts, PrimaryRole>> for Key<SecretParts, UnspecifiedRole>
impl TryFrom<Key<PublicParts, PrimaryRole>> for Key<SecretParts, UnspecifiedRole>
source§fn try_from(p: Key<PublicParts, PrimaryRole>) -> Result<Self>
fn try_from(p: Key<PublicParts, PrimaryRole>) -> Result<Self>
source§impl<R> TryFrom<Key<PublicParts, R>> for Key<SecretParts, R>where
R: KeyRole,
impl<R> TryFrom<Key<PublicParts, R>> for Key<SecretParts, R>where
R: KeyRole,
source§impl TryFrom<Key<PublicParts, SubordinateRole>> for Key<SecretParts, PrimaryRole>
impl TryFrom<Key<PublicParts, SubordinateRole>> for Key<SecretParts, PrimaryRole>
source§fn try_from(p: Key<PublicParts, SubordinateRole>) -> Result<Self>
fn try_from(p: Key<PublicParts, SubordinateRole>) -> Result<Self>
source§impl TryFrom<Key<PublicParts, SubordinateRole>> for Key<SecretParts, UnspecifiedRole>
impl TryFrom<Key<PublicParts, SubordinateRole>> for Key<SecretParts, UnspecifiedRole>
source§fn try_from(p: Key<PublicParts, SubordinateRole>) -> Result<Self>
fn try_from(p: Key<PublicParts, SubordinateRole>) -> Result<Self>
source§impl TryFrom<Key<PublicParts, UnspecifiedRole>> for Key<SecretParts, PrimaryRole>
impl TryFrom<Key<PublicParts, UnspecifiedRole>> for Key<SecretParts, PrimaryRole>
source§fn try_from(p: Key<PublicParts, UnspecifiedRole>) -> Result<Self>
fn try_from(p: Key<PublicParts, UnspecifiedRole>) -> Result<Self>
source§impl TryFrom<Key<PublicParts, UnspecifiedRole>> for Key<SecretParts, SubordinateRole>
impl TryFrom<Key<PublicParts, UnspecifiedRole>> for Key<SecretParts, SubordinateRole>
source§fn try_from(p: Key<PublicParts, UnspecifiedRole>) -> Result<Self>
fn try_from(p: Key<PublicParts, UnspecifiedRole>) -> Result<Self>
source§impl TryFrom<Key<UnspecifiedParts, PrimaryRole>> for Key<SecretParts, SubordinateRole>
impl TryFrom<Key<UnspecifiedParts, PrimaryRole>> for Key<SecretParts, SubordinateRole>
source§fn try_from(p: Key<UnspecifiedParts, PrimaryRole>) -> Result<Self>
fn try_from(p: Key<UnspecifiedParts, PrimaryRole>) -> Result<Self>
source§impl TryFrom<Key<UnspecifiedParts, PrimaryRole>> for Key<SecretParts, UnspecifiedRole>
impl TryFrom<Key<UnspecifiedParts, PrimaryRole>> for Key<SecretParts, UnspecifiedRole>
source§fn try_from(p: Key<UnspecifiedParts, PrimaryRole>) -> Result<Self>
fn try_from(p: Key<UnspecifiedParts, PrimaryRole>) -> Result<Self>
source§impl<R> TryFrom<Key<UnspecifiedParts, R>> for Key<SecretParts, R>where
R: KeyRole,
impl<R> TryFrom<Key<UnspecifiedParts, R>> for Key<SecretParts, R>where
R: KeyRole,
source§impl TryFrom<Key<UnspecifiedParts, SubordinateRole>> for Key<SecretParts, PrimaryRole>
impl TryFrom<Key<UnspecifiedParts, SubordinateRole>> for Key<SecretParts, PrimaryRole>
source§fn try_from(p: Key<UnspecifiedParts, SubordinateRole>) -> Result<Self>
fn try_from(p: Key<UnspecifiedParts, SubordinateRole>) -> Result<Self>
source§impl TryFrom<Key<UnspecifiedParts, SubordinateRole>> for Key<SecretParts, UnspecifiedRole>
impl TryFrom<Key<UnspecifiedParts, SubordinateRole>> for Key<SecretParts, UnspecifiedRole>
source§fn try_from(p: Key<UnspecifiedParts, SubordinateRole>) -> Result<Self>
fn try_from(p: Key<UnspecifiedParts, SubordinateRole>) -> Result<Self>
source§impl TryFrom<Key<UnspecifiedParts, UnspecifiedRole>> for Key<SecretParts, PrimaryRole>
impl TryFrom<Key<UnspecifiedParts, UnspecifiedRole>> for Key<SecretParts, PrimaryRole>
source§fn try_from(p: Key<UnspecifiedParts, UnspecifiedRole>) -> Result<Self>
fn try_from(p: Key<UnspecifiedParts, UnspecifiedRole>) -> Result<Self>
source§impl TryFrom<Key<UnspecifiedParts, UnspecifiedRole>> for Key<SecretParts, SubordinateRole>
impl TryFrom<Key<UnspecifiedParts, UnspecifiedRole>> for Key<SecretParts, SubordinateRole>
source§fn try_from(p: Key<UnspecifiedParts, UnspecifiedRole>) -> Result<Self>
fn try_from(p: Key<UnspecifiedParts, UnspecifiedRole>) -> Result<Self>
source§impl<'a, P, R, R2> ValidAmalgamation<'a, Key<P, R>> for ValidKeyAmalgamation<'a, P, R, R2>
impl<'a, P, R, R2> ValidAmalgamation<'a, Key<P, R>> for ValidKeyAmalgamation<'a, P, R, R2>
source§fn cert(&self) -> &ValidCert<'a>
fn cert(&self) -> &ValidCert<'a>
source§fn time(&self) -> SystemTime
fn time(&self) -> SystemTime
source§fn binding_signature(&self) -> &'a Signature
fn binding_signature(&self) -> &'a Signature
source§fn revocation_status(&self) -> RevocationStatus<'a>
fn revocation_status(&self) -> RevocationStatus<'a>
source§fn revocation_keys(&self) -> Box<dyn Iterator<Item = &'a RevocationKey> + 'a>
fn revocation_keys(&self) -> Box<dyn Iterator<Item = &'a RevocationKey> + 'a>
source§impl<'a, P> ValidateAmalgamation<'a, Key<P, PrimaryRole>> for PrimaryKeyAmalgamation<'a, P>where
P: 'a + KeyParts,
impl<'a, P> ValidateAmalgamation<'a, Key<P, PrimaryRole>> for PrimaryKeyAmalgamation<'a, P>where
P: 'a + KeyParts,
§type V = ValidKeyAmalgamation<'a, P, PrimaryRole, ()>
type V = ValidKeyAmalgamation<'a, P, PrimaryRole, ()>
with_policy
. Read moresource§impl<'a, P> ValidateAmalgamation<'a, Key<P, PrimaryRole>> for ValidPrimaryKeyAmalgamation<'a, P>where
P: 'a + KeyParts,
impl<'a, P> ValidateAmalgamation<'a, Key<P, PrimaryRole>> for ValidPrimaryKeyAmalgamation<'a, P>where
P: 'a + KeyParts,
§type V = ValidKeyAmalgamation<'a, P, PrimaryRole, ()>
type V = ValidKeyAmalgamation<'a, P, PrimaryRole, ()>
with_policy
. Read moresource§impl<'a, P> ValidateAmalgamation<'a, Key<P, SubordinateRole>> for SubordinateKeyAmalgamation<'a, P>where
P: 'a + KeyParts,
impl<'a, P> ValidateAmalgamation<'a, Key<P, SubordinateRole>> for SubordinateKeyAmalgamation<'a, P>where
P: 'a + KeyParts,
§type V = ValidKeyAmalgamation<'a, P, SubordinateRole, ()>
type V = ValidKeyAmalgamation<'a, P, SubordinateRole, ()>
with_policy
. Read moresource§impl<'a, P> ValidateAmalgamation<'a, Key<P, SubordinateRole>> for ValidSubordinateKeyAmalgamation<'a, P>where
P: 'a + KeyParts,
impl<'a, P> ValidateAmalgamation<'a, Key<P, SubordinateRole>> for ValidSubordinateKeyAmalgamation<'a, P>where
P: 'a + KeyParts,
§type V = ValidKeyAmalgamation<'a, P, SubordinateRole, ()>
type V = ValidKeyAmalgamation<'a, P, SubordinateRole, ()>
with_policy
. Read moresource§impl<'a, P> ValidateAmalgamation<'a, Key<P, UnspecifiedRole>> for ErasedKeyAmalgamation<'a, P>where
P: 'a + KeyParts,
impl<'a, P> ValidateAmalgamation<'a, Key<P, UnspecifiedRole>> for ErasedKeyAmalgamation<'a, P>where
P: 'a + KeyParts,
§type V = ValidKeyAmalgamation<'a, P, UnspecifiedRole, bool>
type V = ValidKeyAmalgamation<'a, P, UnspecifiedRole, bool>
with_policy
. Read moresource§impl<'a, P> ValidateAmalgamation<'a, Key<P, UnspecifiedRole>> for ValidErasedKeyAmalgamation<'a, P>where
P: 'a + KeyParts,
impl<'a, P> ValidateAmalgamation<'a, Key<P, UnspecifiedRole>> for ValidErasedKeyAmalgamation<'a, P>where
P: 'a + KeyParts,
§type V = ValidKeyAmalgamation<'a, P, UnspecifiedRole, bool>
type V = ValidKeyAmalgamation<'a, P, UnspecifiedRole, bool>
with_policy
. Read moreimpl<P: Eq + KeyParts, R: Eq + KeyRole> Eq for Key<P, R>
impl<P: KeyParts, R: KeyRole> StructuralPartialEq for Key<P, R>
Auto Trait Implementations§
impl<P, R> !Freeze for Key<P, R>
impl<P, R> RefUnwindSafe for Key<P, R>where
P: RefUnwindSafe,
R: RefUnwindSafe,
impl<P, R> Send for Key<P, R>
impl<P, R> Sync for Key<P, R>
impl<P, R> Unpin for Key<P, R>
impl<P, R> UnwindSafe for Key<P, R>where
P: UnwindSafe,
R: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)