[][src]Struct sequoia_openpgp::cert::components::ValidPrimaryKeyAmalgamation

pub struct ValidPrimaryKeyAmalgamation<'a, P: KeyParts> { /* fields omitted */ }

A Key and its associated data.

This is just a wrapper around ValidKeyAmalgamation that preserves the ValidKeyAmalgamation's role.

Methods

impl<'a, P> ValidPrimaryKeyAmalgamation<'a, P> where
    P: KeyParts
[src]

pub fn mark_parts_public(self) -> ValidPrimaryKeyAmalgamation<'a, PublicParts>[src]

Changes the key's parts tag to PublicParts.

pub fn mark_parts_public_ref(
    &'a self
) -> &'a ValidPrimaryKeyAmalgamation<'a, PublicParts>
[src]

Changes the key's parts tag to PublicParts.

pub fn mark_parts_secret(
    self
) -> Result<ValidPrimaryKeyAmalgamation<'a, SecretParts>>
[src]

Changes the key's parts tag to SecretParts.

pub fn mark_parts_secret_ref(
    &'a self
) -> Result<&'a ValidPrimaryKeyAmalgamation<'a, SecretParts>>
[src]

Changes the key's parts tag to SecretParts.

pub fn mark_parts_unspecified(
    self
) -> ValidPrimaryKeyAmalgamation<'a, UnspecifiedParts>
[src]

Changes the key's parts tag to UnspecifiedParts.

pub fn mark_parts_unspecified_ref(
    &'a self
) -> &ValidPrimaryKeyAmalgamation<'a, UnspecifiedParts>
[src]

Changes the key's parts tag to UnspecifiedParts.

impl<'a, P: KeyParts> ValidPrimaryKeyAmalgamation<'a, P>[src]

pub fn key(&self) -> &'a Key<P, PrimaryRole>[src]

Returns the key.

Methods from Deref<Target = ValidKeyAmalgamation<'a, P>>

pub fn mark_parts_public_ref(
    &'a self
) -> &'a ValidKeyAmalgamation<'a, PublicParts>
[src]

Changes the key's parts tag to PublicParts.

pub fn mark_parts_secret_ref(
    &'a self
) -> Result<&'a ValidKeyAmalgamation<'a, SecretParts>>
[src]

Changes the key's parts tag to SecretParts.

pub fn mark_parts_unspecified_ref(
    &'a self
) -> &ValidKeyAmalgamation<'a, UnspecifiedParts>
[src]

Changes the key's parts tag to UnspecifiedParts.

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.

Trait Implementations

impl<'a, P: 'a + KeyParts> Amalgamation<'a, Key<P, UnspecifiedRole>> for ValidPrimaryKeyAmalgamation<'a, P>[src]

type V = Self

The type returned by with_policy.

impl<'a, P: 'a + KeyParts> ValidAmalgamation<'a, Key<P, UnspecifiedRole>> for ValidPrimaryKeyAmalgamation<'a, P>[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 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 key_expiration_time(&self) -> Option<SystemTime>[src]

Returns the key's expiration time as of the amalgamtion's reference time.

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.

fn cert_revoked(&self) -> RevocationStatus<'a>[src]

Returns the certificate's revocation status as of the amalgamtion's reference time. Read more

fn cert_alive(&self) -> Result<()>[src]

Returns whether the certificateis alive as of the amalgamtion's reference time. Read more

fn map<F: Fn(&'a Signature) -> Option<T>, T>(&self, f: F) -> Option<T>[src]

Maps the given function over binding and direct key signature. Read more

fn key_flags(&self) -> Option<KeyFlags>[src]

Returns the key's key flags as of the amalgamtion's reference time. Read more

fn has_any_key_flag<F>(&self, flags: F) -> bool where
    F: Borrow<KeyFlags>, 
[src]

Returns whether the key has at least one of the specified key flags as of the amalgamtion's reference time. Read more

fn for_certification(&self) -> bool[src]

Returns whether key is certification capable as of the amalgamtion's reference time. Read more

fn for_signing(&self) -> bool[src]

Returns whether key is signing capable as of the amalgamtion's reference time. Read more

fn for_authentication(&self) -> bool[src]

Returns whether key is authentication capable as of the amalgamtion's reference time. Read more

fn for_storage_encryption(&self) -> bool[src]

Returns whether key is intended for storage encryption as of the amalgamtion's reference time. Read more

fn for_transport_encryption(&self) -> bool[src]

Returns whether key is intended for transport encryption as of the amalgamtion's reference time. Read more

fn key_validity_period(&self) -> Option<Duration>[src]

Returns the key's expiration time as of the amalgamtion's reference time. Read more

fn revocation_keys(&self) -> Box<dyn Iterator<Item = &'a RevocationKey> + 'a>[src]

Returns the value of the Revocation Key subpacket, which contains a designated revoker. Read more

impl<'a, P: KeyParts> Preferences<'a, Key<P, UnspecifiedRole>> for ValidPrimaryKeyAmalgamation<'a, P>[src]

fn preferred_symmetric_algorithms(&self) -> Option<&'a [SymmetricAlgorithm]>[src]

Returns symmetric algorithms that the key holder prefers. Read more

fn preferred_hash_algorithms(&self) -> Option<&'a [HashAlgorithm]>[src]

Returns hash algorithms that the key holder prefers. Read more

fn preferred_compression_algorithms(&self) -> Option<&'a [CompressionAlgorithm]>[src]

Returns compression algorithms that the key holder prefers. Read more

fn preferred_aead_algorithms(&self) -> Option<&'a [AEADAlgorithm]>[src]

Returns AEAD algorithms that the key holder prefers. Read more

fn key_server_preferences(&self) -> Option<KeyServerPreferences>[src]

Returns the key holder's keyserver preferences.

fn preferred_key_server(&self) -> Option<&'a [u8]>[src]

Returns the key holder's preferred keyserver for updates.

fn features(&self) -> Option<Features>[src]

Returns the key holder's feature set.

impl<'a> From<ValidPrimaryKeyAmalgamation<'a, PublicParts>> for ValidPrimaryKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<&'a ValidPrimaryKeyAmalgamation<'a, PublicParts>> for &'a ValidPrimaryKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<ValidPrimaryKeyAmalgamation<'a, SecretParts>> for ValidPrimaryKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<&'a ValidPrimaryKeyAmalgamation<'a, SecretParts>> for &'a ValidPrimaryKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<ValidPrimaryKeyAmalgamation<'a, SecretParts>> for ValidPrimaryKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<&'a ValidPrimaryKeyAmalgamation<'a, SecretParts>> for &'a ValidPrimaryKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<ValidPrimaryKeyAmalgamation<'a, UnspecifiedParts>> for ValidPrimaryKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<&'a ValidPrimaryKeyAmalgamation<'a, UnspecifiedParts>> for &'a ValidPrimaryKeyAmalgamation<'a, PublicParts>[src]

impl<'a, P> From<ValidPrimaryKeyAmalgamation<'a, P>> for ValidKeyAmalgamation<'a, P> where
    P: KeyParts
[src]

impl<'a, P: Clone + KeyParts> Clone for ValidPrimaryKeyAmalgamation<'a, P>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a, P: KeyParts> Deref for ValidPrimaryKeyAmalgamation<'a, P>[src]

type Target = ValidKeyAmalgamation<'a, P>

The resulting type after dereferencing.

impl<'a, P: Debug + KeyParts> Debug for ValidPrimaryKeyAmalgamation<'a, P>[src]

impl<'a> TryFrom<ValidPrimaryKeyAmalgamation<'a, PublicParts>> for ValidPrimaryKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a ValidPrimaryKeyAmalgamation<'a, PublicParts>> for &'a ValidPrimaryKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<ValidPrimaryKeyAmalgamation<'a, UnspecifiedParts>> for ValidPrimaryKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a ValidPrimaryKeyAmalgamation<'a, UnspecifiedParts>> for &'a ValidPrimaryKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<'a, P> !Send for ValidPrimaryKeyAmalgamation<'a, P>

impl<'a, P> !Sync for ValidPrimaryKeyAmalgamation<'a, P>

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip for T where
    V: MultiLane<T>,