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

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

Changes the key's parts tag to PublicParts.

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

Changes the key's parts tag to PublicParts.

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

Changes the key's parts tag to SecretParts.

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

Changes the key's parts tag to SecretParts.

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

Changes the key's parts tag to UnspecifiedParts.

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

Changes the key's parts tag to UnspecifiedParts.

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

pub fn key(&self) -> &'a Key<P, 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 mark_parts_public_ref(&'a self) -> &'a KeyAmalgamation<'a, PublicParts>[src]

Changes the key's parts tag to PublicParts.

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

Changes the key's parts tag to SecretParts.

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

Changes the key's parts tag to UnspecifiedParts.

pub fn primary(&self) -> bool[src]

Returns whether the key is a primary key.

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

Returns the key.

Trait Implementations

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

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

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

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

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

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

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

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

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

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

type Target = KeyAmalgamation<'a, P>

The resulting type after dereferencing.

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

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

type Error = Error

The type returned in the event of a conversion error.

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

type Error = Error

The type returned in the event of a conversion error.

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

type Error = Error

The type returned in the event of a conversion error.

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

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

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

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

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>,