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

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

A Key and its associated data.

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

Methods

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

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

Returns the key.

pub fn with_policy<T>(
    self,
    policy: &'a dyn Policy,
    time: T
) -> Result<ValidPrimaryKeyAmalgamation<'a, P>> where
    T: Into<Option<SystemTime>>, 
[src]

Sets the reference time for the amalgamation.

If time is None, the current time is used.

This transforms the KeyAmalgamation into a ValidKeyAmalgamation.

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: Clone + KeyParts> Clone for PrimaryKeyAmalgamation<'a, P>[src]

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

impl<'a, P: KeyParts> Deref for PrimaryKeyAmalgamation<'a, P> where
    &'a Key<P, PrimaryRole>: From<&'a Key<PublicParts, PrimaryRole>>, 
[src]

type Target = KeyAmalgamation<'a, P>

The resulting type after dereferencing.

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

Auto Trait Implementations

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

impl<'a, P> Send for PrimaryKeyAmalgamation<'a, P> where
    P: Sync

impl<'a, P> Sync for PrimaryKeyAmalgamation<'a, P> where
    P: Sync

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

impl<'a, P> !UnwindSafe for PrimaryKeyAmalgamation<'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>,