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

pub struct ValidKeyAmalgamation<'a, P, R, R2> where
    P: 'a + KeyParts,
    R: 'a + KeyRole,
    R2: Copy
{ /* fields omitted */ }

A validated KeyAmalgamation.

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

Implementations

impl<'a, P> ValidKeyAmalgamation<'a, P, PrimaryRole, ()> where
    P: KeyParts
[src]

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

Changes the key's parts tag to PublicParts.

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

Changes the key's parts tag to PublicParts.

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

Changes the key's parts tag to SecretParts.

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

Changes the key's parts tag to SecretParts.

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

Changes the key's parts tag to UnspecifiedParts.

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

Changes the key's parts tag to UnspecifiedParts.

impl<'a, P> ValidKeyAmalgamation<'a, P, SubordinateRole, ()> where
    P: KeyParts
[src]

pub fn parts_into_public(
    self
) -> ValidSubordinateKeyAmalgamation<'a, PublicParts>
[src]

Changes the key's parts tag to PublicParts.

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

Changes the key's parts tag to PublicParts.

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

Changes the key's parts tag to SecretParts.

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

Changes the key's parts tag to SecretParts.

pub fn parts_into_unspecified(
    self
) -> ValidSubordinateKeyAmalgamation<'a, UnspecifiedParts>
[src]

Changes the key's parts tag to UnspecifiedParts.

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

Changes the key's parts tag to UnspecifiedParts.

impl<'a, P> ValidKeyAmalgamation<'a, P, UnspecifiedRole, bool> where
    P: KeyParts
[src]

pub fn parts_into_public(self) -> ValidErasedKeyAmalgamation<'a, PublicParts>[src]

Changes the key's parts tag to PublicParts.

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

Changes the key's parts tag to PublicParts.

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

Changes the key's parts tag to SecretParts.

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

Changes the key's parts tag to SecretParts.

pub fn parts_into_unspecified(
    self
) -> ValidErasedKeyAmalgamation<'a, UnspecifiedParts>
[src]

Changes the key's parts tag to UnspecifiedParts.

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

Changes the key's parts tag to UnspecifiedParts.

impl<'a, P, R, R2> ValidKeyAmalgamation<'a, P, R, R2> where
    P: 'a + KeyParts,
    R: 'a + KeyRole,
    R2: Copy,
    Self: ValidAmalgamation<'a, Key<P, R>>, 
[src]

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

Returns whether the key (not just the binding signature!) 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 into_key_amalgamation(self) -> KeyAmalgamation<'a, P, R, R2>[src]

Returns the wrapped KeyAmalgamation.

impl<'a, P, R, R2> ValidKeyAmalgamation<'a, P, R, R2> where
    P: 'a + KeyParts,
    R: 'a + KeyRole,
    R2: Copy,
    Self: PrimaryKey<'a, P, R>, 
[src]

pub fn set_expiration_time(
    &self,
    primary_signer: &mut dyn Signer,
    expiration: Option<SystemTime>
) -> Result<Vec<Packet>>
[src]

Sets the key to expire at the given time.

A policy is needed, because the expiration is updated by adding a self-signature to the primary user id.

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

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

Changes the key's parts tag to PublicParts.

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

Changes the key's parts tag to SecretParts.

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

Changes the key's parts tag to UnspecifiedParts.

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

Changes the key's parts tag to PublicParts.

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

Changes the key's parts tag to SecretParts.

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

Changes the key's parts tag to UnspecifiedParts.

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

Changes the key's parts tag to PublicParts.

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

Changes the key's parts tag to SecretParts.

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

Changes the key's parts tag to UnspecifiedParts.

pub fn component_amalgamation(&self) -> &ComponentAmalgamation<'a, Key<P, R>>[src]

Returns the KeyAmalgamation's ComponentAmalgamation.

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

Returns the KeyAmalgamation's key.

Normally, a type implementing KeyAmalgamation eventually derefs to a Key, however, this method provides a more accurate lifetime. See the documentation for ComponentAmalgamation::component for an explanation.

Trait Implementations

impl<'a, P: Clone, R: Clone, R2: Clone> Clone for ValidKeyAmalgamation<'a, P, R, R2> where
    P: 'a + KeyParts,
    R: 'a + KeyRole,
    R2: Copy
[src]

impl<'a, P: Debug, R: Debug, R2: Debug> Debug for ValidKeyAmalgamation<'a, P, R, R2> where
    P: 'a + KeyParts,
    R: 'a + KeyRole,
    R2: Copy
[src]

impl<'a, P, R, R2> Deref for ValidKeyAmalgamation<'a, P, R, R2> where
    P: 'a + KeyParts,
    R: 'a + KeyRole,
    R2: Copy
[src]

type Target = KeyAmalgamation<'a, P, R, R2>

The resulting type after dereferencing.

impl<'a> From<&'a ValidKeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for &'a ValidPrimaryKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<&'a ValidKeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for &'a ValidSubordinateKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<&'a ValidKeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for &'a ValidErasedKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<&'a ValidKeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for &'a ValidPrimaryKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<&'a ValidKeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for &'a ValidPrimaryKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<&'a ValidKeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for &'a ValidSubordinateKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<&'a ValidKeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for &'a ValidSubordinateKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<&'a ValidKeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a ValidErasedKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<&'a ValidKeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a ValidErasedKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<&'a ValidKeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for &'a ValidPrimaryKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<&'a ValidKeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for &'a ValidSubordinateKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<&'a ValidKeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for &'a ValidErasedKeyAmalgamation<'a, PublicParts>[src]

impl<'a, P: 'a + KeyParts> From<ValidKeyAmalgamation<'a, P, PrimaryRole, ()>> for ValidErasedKeyAmalgamation<'a, P>[src]

impl<'a, P, R, R2> From<ValidKeyAmalgamation<'a, P, R, R2>> for KeyAmalgamation<'a, P, R, R2> where
    P: 'a + KeyParts,
    R: 'a + KeyRole,
    R2: Copy
[src]

impl<'a, P: 'a + KeyParts> From<ValidKeyAmalgamation<'a, P, SubordinateRole, ()>> for ValidErasedKeyAmalgamation<'a, P>[src]

impl<'a> From<ValidKeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for ValidPrimaryKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<ValidKeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for ValidErasedKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<ValidKeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for ValidSubordinateKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<ValidKeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for ValidErasedKeyAmalgamation<'a, UnspecifiedParts>[src]

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

impl<'a> From<ValidKeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for ValidPrimaryKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<ValidKeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for ValidPrimaryKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<ValidKeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for ValidErasedKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<ValidKeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for ValidErasedKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<ValidKeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for ValidSubordinateKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<ValidKeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for ValidSubordinateKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<ValidKeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for ValidErasedKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<ValidKeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for ValidErasedKeyAmalgamation<'a, UnspecifiedParts>[src]

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

impl<'a> From<ValidKeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for ValidErasedKeyAmalgamation<'a, UnspecifiedParts>[src]

impl<'a> From<ValidKeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for ValidPrimaryKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<ValidKeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for ValidErasedKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<ValidKeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for ValidSubordinateKeyAmalgamation<'a, PublicParts>[src]

impl<'a> From<ValidKeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for ValidErasedKeyAmalgamation<'a, PublicParts>[src]

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

impl<'a> TryFrom<&'a ValidKeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for &'a ValidPrimaryKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a ValidKeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for &'a ValidSubordinateKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a ValidKeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for &'a ValidErasedKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a ValidKeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for &'a ValidPrimaryKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a ValidKeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for &'a ValidSubordinateKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a ValidKeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for &'a ValidErasedKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a, P, P2> TryFrom<ValidKeyAmalgamation<'a, P, UnspecifiedRole, bool>> for ValidPrimaryKeyAmalgamation<'a, P2> where
    P: 'a + KeyParts,
    P2: 'a + KeyParts
[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a, P, P2> TryFrom<ValidKeyAmalgamation<'a, P, UnspecifiedRole, bool>> for ValidSubordinateKeyAmalgamation<'a, P2> where
    P: 'a + KeyParts,
    P2: 'a + KeyParts
[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<ValidKeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for ValidPrimaryKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<ValidKeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for ValidSubordinateKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

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

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<ValidKeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for ValidPrimaryKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<ValidKeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for ValidSubordinateKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<ValidKeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for ValidErasedKeyAmalgamation<'a, SecretParts>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a, P, R, R2> ValidAmalgamation<'a, Key<P, R>> for ValidKeyAmalgamation<'a, P, R, R2> where
    P: 'a + KeyParts,
    R: 'a + KeyRole,
    R2: Copy,
    Self: PrimaryKey<'a, P, R>, 
[src]

Auto Trait Implementations

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

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

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

impl<'a, P, R, R2> Unpin for ValidKeyAmalgamation<'a, P, R, R2> where
    R2: Unpin

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

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