[−][src]Struct sequoia_openpgp::cert::components::ValidPrimaryKeyAmalgamation
A Key
and its associated data.
This is just a wrapper around ValidKeyAmalgamation
that
preserves the ValidKeyAmalgamation
's role.
Methods
impl<'a, P: KeyParts> ValidPrimaryKeyAmalgamation<'a, P>
[src]
pub fn key(&self) -> &'a Key<P, PrimaryRole> where
&'a Key<P, UnspecifiedRole>: From<&'a Key<PublicParts, PrimaryRole>>,
[src]
&'a Key<P, UnspecifiedRole>: From<&'a Key<PublicParts, PrimaryRole>>,
Returns the key.
pub fn with_policy<T>(self, policy: &'a dyn Policy, time: T) -> Result<Self> where
T: Into<Option<SystemTime>>,
[src]
T: Into<Option<SystemTime>>,
Changes the amalgamation's policy.
If time
is None
, the current time is used.
Methods from Deref<Target = ValidKeyAmalgamation<'a, P>>
pub fn bundle(&self) -> &'a KeyBundle<P, UnspecifiedRole> where
&'a KeyBundle<P, UnspecifiedRole>: From<&'a KeyBundle<PublicParts, PrimaryRole>>,
[src]
&'a KeyBundle<P, UnspecifiedRole>: From<&'a KeyBundle<PublicParts, PrimaryRole>>,
Returns this key's bundle.
pub fn alive(&self) -> Result<()>
[src]
Returns whether the key is alive as of the amalgamtion's reference time.
Note: this does not return whether the certificate is valid.
Considers both the binding signature and the direct key signature. Information in the binding signature takes precedence over the direct key signature. See also Section 5.2.3.3 of RFC 4880.
pub fn has_secret(&self) -> bool
[src]
Returns whether the key contains secret key material.
pub fn has_unencrypted_secret(&self) -> bool
[src]
Returns whether the key contains unencrypted secret key material.
Trait Implementations
impl<'a, P: 'a + KeyParts> Amalgamation<'a> for ValidPrimaryKeyAmalgamation<'a, P>
[src]
fn cert(&self) -> &'a Cert
[src]
fn time(&self) -> SystemTime
[src]
Returns the amalgamation's reference time.
For queries that are with respect to a point in time, this
determines that point in time. For instance, if a key is
created at t_c
and expires at t_e
, then
ValidKeyAmalgamation::alive
will return true if the reference
time is greater than or equal to t_c
and less than t_e
.
fn policy(&self) -> &'a dyn Policy
[src]
Returns the amalgamation's policy.
fn with_policy<T>(self, policy: &'a dyn Policy, time: T) -> Result<Self> where
T: Into<Option<SystemTime>>,
[src]
T: Into<Option<SystemTime>>,
Changes the amalgamation's policy.
If time
is None
, the current time is used.
fn binding_signature(&self) -> &'a Signature
[src]
Returns the key's binding signature as of the reference time, if any.
fn direct_key_signature(&self) -> Option<&'a Signature>
[src]
Returns the Certificate's direct key signature as of the reference time, if any.
Subpackets on direct key signatures apply to all components of the certificate.
fn revoked(&self) -> RevocationStatus<'a>
[src]
Returns the key's revocation status as of the amalgamation's reference time.
Note: this function only returns whether the key has been revoked, it does not return whether the certificate has been revoked.
fn cert_revoked(&self) -> RevocationStatus<'a>
[src]
fn cert_alive(&self) -> Result<()>
[src]
fn map<F: Fn(&'a Signature) -> Option<T>, T>(&self, f: F) -> Option<T>
[src]
fn key_flags(&self) -> Option<KeyFlags>
[src]
fn has_any_key_flag<F>(&self, flags: F) -> bool where
F: Borrow<KeyFlags>,
[src]
F: Borrow<KeyFlags>,
fn for_certification(&self) -> bool
[src]
fn for_signing(&self) -> bool
[src]
fn for_authentication(&self) -> bool
[src]
fn for_storage_encryption(&self) -> bool
[src]
fn for_transport_encryption(&self) -> bool
[src]
fn key_expiration_time(&self) -> Option<Duration>
[src]
fn revocation_key(&self) -> Option<(u8, PublicKeyAlgorithm, Fingerprint)>
[src]
impl<'a, P: Clone + KeyParts> Clone for ValidPrimaryKeyAmalgamation<'a, P>
[src]
fn clone(&self) -> ValidPrimaryKeyAmalgamation<'a, P>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a, P: Debug + KeyParts> Debug for ValidPrimaryKeyAmalgamation<'a, P>
[src]
impl<'a, P: KeyParts> Deref for ValidPrimaryKeyAmalgamation<'a, P> where
&'a Key<P, PrimaryRole>: From<&'a Key<PublicParts, PrimaryRole>>,
[src]
&'a Key<P, PrimaryRole>: From<&'a Key<PublicParts, PrimaryRole>>,
type Target = ValidKeyAmalgamation<'a, P>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<'a, P> From<ValidPrimaryKeyAmalgamation<'a, P>> for ValidKeyAmalgamation<'a, P> where
P: KeyParts,
[src]
P: KeyParts,
fn from(a: ValidPrimaryKeyAmalgamation<'a, P>) -> Self
[src]
impl<'a, P: KeyParts> Preferences<'a> for ValidPrimaryKeyAmalgamation<'a, P>
[src]
fn preferred_symmetric_algorithms(&self) -> Option<&'a [SymmetricAlgorithm]>
[src]
fn preferred_hash_algorithms(&self) -> Option<&'a [HashAlgorithm]>
[src]
fn preferred_compression_algorithms(&self) -> Option<&'a [CompressionAlgorithm]>
[src]
fn preferred_aead_algorithms(&self) -> Option<&'a [AEADAlgorithm]>
[src]
fn key_server_preferences(&self) -> Option<KeyServerPreferences>
[src]
fn preferred_key_server(&self) -> Option<&'a [u8]>
[src]
fn features(&self) -> Option<Features>
[src]
Auto Trait Implementations
impl<'a, P> !RefUnwindSafe for ValidPrimaryKeyAmalgamation<'a, P>
impl<'a, P> !Send for ValidPrimaryKeyAmalgamation<'a, P>
impl<'a, P> !Sync for ValidPrimaryKeyAmalgamation<'a, P>
impl<'a, P> Unpin for ValidPrimaryKeyAmalgamation<'a, P>
impl<'a, P> !UnwindSafe for ValidPrimaryKeyAmalgamation<'a, P>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,