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

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

A Key and its associated data.

A ValidKeyAmalgamation includes a reference time, and is guaranteed to have a live binding signature at that time.

Methods

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

pub fn bundle(&self) -> &'a KeyBundle<P, UnspecifiedRole> where
    &'a KeyBundle<P, UnspecifiedRole>: From<&'a KeyBundle<PublicParts, PrimaryRole>>, 
[src]

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.

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

pub fn key(&self) -> &'a Key<P, UnspecifiedRole> where
    &'a Key<P, UnspecifiedRole>: From<&'a Key<PublicParts, PrimaryRole>>, 
[src]

Returns the key.

pub fn cert(&self) -> &'a Cert[src]

Returns the certificate that the key came from.

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.

pub fn bundle(&self) -> &'a KeyBundle<P, UnspecifiedRole> where
    &'a KeyBundle<P, UnspecifiedRole>: From<&'a KeyBundle<PublicParts, PrimaryRole>>, 
[src]

Returns this key's bundle.

Trait Implementations

impl<'a, P: 'a + KeyParts> Amalgamation<'a> for ValidKeyAmalgamation<'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 with_policy<T>(self, policy: &'a dyn Policy, time: T) -> Result<Self> where
    T: Into<Option<SystemTime>>, 
[src]

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.

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

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

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

type Target = KeyAmalgamation<'a, P>

The resulting type after dereferencing.

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

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

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

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

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

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<'a, P> !RefUnwindSafe for ValidKeyAmalgamation<'a, P>

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

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

impl<'a, P> Unpin for ValidKeyAmalgamation<'a, P>

impl<'a, P> !UnwindSafe for ValidKeyAmalgamation<'a, P>

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<V> for T where
    V: MultiLane<T>,