Type Alias sequoia_openpgp::cert::amalgamation::key::ErasedKeyAmalgamation

source ·
pub type ErasedKeyAmalgamation<'a, P> = KeyAmalgamation<'a, P, UnspecifiedRole, bool>;
Expand description

An amalgamation whose role is not known at compile time.

A specialized version of KeyAmalgamation.

Unlike a Key or a KeyBundle with an unspecified role, an ErasedKeyAmalgamation remembers its role; it is just not exposed to the type system. For details, see the module-level documentation.

Aliased Type§

struct ErasedKeyAmalgamation<'a, P> { /* private fields */ }

Implementations§

source§

impl<'a, P> ErasedKeyAmalgamation<'a, P>
where P: KeyParts,

source

pub fn parts_into_public(self) -> ErasedKeyAmalgamation<'a, PublicParts>

Changes the key’s parts tag to PublicParts.

source

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

Changes the key’s parts tag to PublicParts.

source

pub fn parts_as_public_mut( &'a mut self, ) -> &'a mut ErasedKeyAmalgamation<'a, PublicParts>

Changes the key’s parts tag to PublicParts.

source

pub fn parts_into_secret(self) -> Result<ErasedKeyAmalgamation<'a, SecretParts>>

Changes the key’s parts tag to SecretParts.

source

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

Changes the key’s parts tag to SecretParts.

source

pub fn parts_as_secret_mut( &'a mut self, ) -> Result<&'a mut ErasedKeyAmalgamation<'a, SecretParts>>

Changes the key’s parts tag to SecretParts.

source

pub fn parts_into_unspecified( self, ) -> ErasedKeyAmalgamation<'a, UnspecifiedParts>

Changes the key’s parts tag to UnspecifiedParts.

source

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

Changes the key’s parts tag to UnspecifiedParts.

source

pub fn parts_as_unspecified_mut( &'a mut self, ) -> &mut ErasedKeyAmalgamation<'a, UnspecifiedParts>

Changes the key’s parts tag to UnspecifiedParts.

Trait Implementations§

source§

impl<'a> From<&'a KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>

source§

fn from(p: &'a ErasedKeyAmalgamation<'a, PublicParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, PublicParts>

source§

fn from(p: &'a ErasedKeyAmalgamation<'a, SecretParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>

source§

fn from(p: &'a ErasedKeyAmalgamation<'a, SecretParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, PublicParts>

source§

fn from(p: &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a mut KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for &'a mut ErasedKeyAmalgamation<'a, UnspecifiedParts>

source§

fn from(p: &'a mut ErasedKeyAmalgamation<'a, PublicParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a mut KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a mut ErasedKeyAmalgamation<'a, PublicParts>

source§

fn from(p: &'a mut ErasedKeyAmalgamation<'a, SecretParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a mut KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a mut ErasedKeyAmalgamation<'a, UnspecifiedParts>

source§

fn from(p: &'a mut ErasedKeyAmalgamation<'a, SecretParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a mut KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for &'a mut ErasedKeyAmalgamation<'a, PublicParts>

source§

fn from(p: &'a mut ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Self

Converts to this type from the input type.
source§

impl<'a, P: 'a + KeyParts> From<KeyAmalgamation<'a, P, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, P>

source§

fn from(ka: PrimaryKeyAmalgamation<'a, P>) -> Self

Converts to this type from the input type.
source§

impl<'a, P: 'a + KeyParts> From<KeyAmalgamation<'a, P, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, P>

source§

fn from(ka: SubordinateKeyAmalgamation<'a, P>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<KeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>

source§

fn from(ka: PrimaryKeyAmalgamation<'a, PublicParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<KeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>

source§

fn from(ka: SubordinateKeyAmalgamation<'a, PublicParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>

source§

fn from(p: ErasedKeyAmalgamation<'a, PublicParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>

source§

fn from(ka: PrimaryKeyAmalgamation<'a, SecretParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>

source§

fn from(ka: PrimaryKeyAmalgamation<'a, SecretParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>

source§

fn from(ka: SubordinateKeyAmalgamation<'a, SecretParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>

source§

fn from(ka: SubordinateKeyAmalgamation<'a, SecretParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, PublicParts>

source§

fn from(p: ErasedKeyAmalgamation<'a, SecretParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>

source§

fn from(p: ErasedKeyAmalgamation<'a, SecretParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>

source§

fn from(ka: PrimaryKeyAmalgamation<'a, UnspecifiedParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>

source§

fn from(ka: SubordinateKeyAmalgamation<'a, UnspecifiedParts>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, PublicParts>

source§

fn from(p: ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Self

Converts to this type from the input type.
source§

impl<'a, P> PrimaryKey<'a, P, UnspecifiedRole> for ErasedKeyAmalgamation<'a, P>
where P: 'a + KeyParts,

source§

fn primary(&self) -> bool

Returns whether the key amalgamation is a primary key amalgamation. Read more
source§

impl<'a> TryFrom<&'a KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, SecretParts>

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(p: &'a ErasedKeyAmalgamation<'a, PublicParts>) -> Result<Self>

Performs the conversion.
source§

impl<'a> TryFrom<&'a KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, SecretParts>

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(p: &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Result<Self>

Performs the conversion.
source§

impl<'a> TryFrom<&'a mut KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for &'a mut ErasedKeyAmalgamation<'a, SecretParts>

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(p: &'a mut ErasedKeyAmalgamation<'a, PublicParts>) -> Result<Self>

Performs the conversion.
source§

impl<'a> TryFrom<&'a mut KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for &'a mut ErasedKeyAmalgamation<'a, SecretParts>

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from( p: &'a mut ErasedKeyAmalgamation<'a, UnspecifiedParts>, ) -> Result<Self>

Performs the conversion.
source§

impl<'a> TryFrom<KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, SecretParts>

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(p: ErasedKeyAmalgamation<'a, PublicParts>) -> Result<Self>

Performs the conversion.
source§

impl<'a> TryFrom<KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, SecretParts>

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(p: ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Result<Self>

Performs the conversion.
source§

impl<'a, P> ValidateAmalgamation<'a, Key<P, UnspecifiedRole>> for ErasedKeyAmalgamation<'a, P>
where P: 'a + KeyParts,

§

type V = ValidKeyAmalgamation<'a, P, UnspecifiedRole, bool>

The type returned by with_policy. Read more
source§

fn with_policy<T>(self, policy: &'a dyn Policy, time: T) -> Result<Self::V>
where T: Into<Option<SystemTime>>,

Uses the specified Policy and reference time with the amalgamation. Read more