Type Definition 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.
Implementations
sourceimpl<'a, P> ErasedKeyAmalgamation<'a, P> where
P: KeyParts,
impl<'a, P> ErasedKeyAmalgamation<'a, P> where
P: KeyParts,
sourcepub fn parts_into_public(self) -> ErasedKeyAmalgamation<'a, PublicParts>
pub fn parts_into_public(self) -> ErasedKeyAmalgamation<'a, PublicParts>
Changes the key’s parts tag to PublicParts
.
sourcepub fn parts_as_public(&'a self) -> &'a ErasedKeyAmalgamation<'a, PublicParts>
pub fn parts_as_public(&'a self) -> &'a ErasedKeyAmalgamation<'a, PublicParts>
Changes the key’s parts tag to PublicParts
.
sourcepub fn parts_into_secret(self) -> Result<ErasedKeyAmalgamation<'a, SecretParts>>
pub fn parts_into_secret(self) -> Result<ErasedKeyAmalgamation<'a, SecretParts>>
Changes the key’s parts tag to SecretParts
.
sourcepub fn parts_as_secret(
&'a self
) -> Result<&'a ErasedKeyAmalgamation<'a, SecretParts>>
pub fn parts_as_secret(
&'a self
) -> Result<&'a ErasedKeyAmalgamation<'a, SecretParts>>
Changes the key’s parts tag to SecretParts
.
sourcepub fn parts_into_unspecified(
self
) -> ErasedKeyAmalgamation<'a, UnspecifiedParts>
pub fn parts_into_unspecified(
self
) -> ErasedKeyAmalgamation<'a, UnspecifiedParts>
Changes the key’s parts tag to UnspecifiedParts
.
sourcepub fn parts_as_unspecified(
&'a self
) -> &ErasedKeyAmalgamation<'a, UnspecifiedParts>
pub fn parts_as_unspecified(
&'a self
) -> &ErasedKeyAmalgamation<'a, UnspecifiedParts>
Changes the key’s parts tag to UnspecifiedParts
.
Trait Implementations
sourceimpl<'a> From<&'a KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<&'a KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>
sourcefn from(p: &'a ErasedKeyAmalgamation<'a, PublicParts>) -> Self
fn from(p: &'a ErasedKeyAmalgamation<'a, PublicParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<&'a KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, PublicParts>
sourcefn from(p: &'a ErasedKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: &'a ErasedKeyAmalgamation<'a, SecretParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<&'a KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<&'a KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>
sourcefn from(p: &'a ErasedKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: &'a ErasedKeyAmalgamation<'a, SecretParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<&'a KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<&'a KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, PublicParts>
sourcefn from(p: &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(p: &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a, P: 'a + KeyParts> From<KeyAmalgamation<'a, P, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, P>
impl<'a, P: 'a + KeyParts> From<KeyAmalgamation<'a, P, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, P>
sourcefn from(ka: PrimaryKeyAmalgamation<'a, P>) -> Self
fn from(ka: PrimaryKeyAmalgamation<'a, P>) -> Self
Converts to this type from the input type.
sourceimpl<'a, P: 'a + KeyParts> From<KeyAmalgamation<'a, P, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, P>
impl<'a, P: 'a + KeyParts> From<KeyAmalgamation<'a, P, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, P>
sourcefn from(ka: SubordinateKeyAmalgamation<'a, P>) -> Self
fn from(ka: SubordinateKeyAmalgamation<'a, P>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<KeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, PublicParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
sourcefn from(ka: PrimaryKeyAmalgamation<'a, PublicParts>) -> Self
fn from(ka: PrimaryKeyAmalgamation<'a, PublicParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<KeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, PublicParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
sourcefn from(ka: SubordinateKeyAmalgamation<'a, PublicParts>) -> Self
fn from(ka: SubordinateKeyAmalgamation<'a, PublicParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
sourcefn from(p: ErasedKeyAmalgamation<'a, PublicParts>) -> Self
fn from(p: ErasedKeyAmalgamation<'a, PublicParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
sourcefn from(ka: PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
fn from(ka: PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
sourcefn from(ka: PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
fn from(ka: PrimaryKeyAmalgamation<'a, SecretParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
sourcefn from(ka: SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
fn from(ka: SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
sourcefn from(ka: SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
fn from(ka: SubordinateKeyAmalgamation<'a, SecretParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, PublicParts>
sourcefn from(p: ErasedKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: ErasedKeyAmalgamation<'a, SecretParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
impl<'a> From<KeyAmalgamation<'a, SecretParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, UnspecifiedParts>
sourcefn from(p: ErasedKeyAmalgamation<'a, SecretParts>) -> Self
fn from(p: ErasedKeyAmalgamation<'a, SecretParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, PrimaryRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
sourcefn from(ka: PrimaryKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(ka: PrimaryKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, SubordinateRole, ()>> for ErasedKeyAmalgamation<'a, PublicParts>
sourcefn from(ka: SubordinateKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(ka: SubordinateKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, PublicParts>
impl<'a> From<KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, PublicParts>
sourcefn from(p: ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Self
fn from(p: ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Self
Converts to this type from the input type.
sourceimpl<'a, P> PrimaryKey<'a, P, UnspecifiedRole> for ErasedKeyAmalgamation<'a, P> where
P: 'a + KeyParts,
impl<'a, P> PrimaryKey<'a, P, UnspecifiedRole> for ErasedKeyAmalgamation<'a, P> where
P: 'a + KeyParts,
sourceimpl<'a> TryFrom<&'a KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, SecretParts>
impl<'a> TryFrom<&'a KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, SecretParts>
sourcefn try_from(p: &'a ErasedKeyAmalgamation<'a, PublicParts>) -> Result<Self>
fn try_from(p: &'a ErasedKeyAmalgamation<'a, PublicParts>) -> Result<Self>
Performs the conversion.
sourceimpl<'a> TryFrom<&'a KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, SecretParts>
impl<'a> TryFrom<&'a KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for &'a ErasedKeyAmalgamation<'a, SecretParts>
sourcefn try_from(p: &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Result<Self>
fn try_from(p: &'a ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Result<Self>
Performs the conversion.
sourceimpl<'a> TryFrom<KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, SecretParts>
impl<'a> TryFrom<KeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, SecretParts>
sourcefn try_from(p: ErasedKeyAmalgamation<'a, PublicParts>) -> Result<Self>
fn try_from(p: ErasedKeyAmalgamation<'a, PublicParts>) -> Result<Self>
Performs the conversion.
sourceimpl<'a> TryFrom<KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, SecretParts>
impl<'a> TryFrom<KeyAmalgamation<'a, UnspecifiedParts, UnspecifiedRole, bool>> for ErasedKeyAmalgamation<'a, SecretParts>
sourcefn try_from(p: ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Result<Self>
fn try_from(p: ErasedKeyAmalgamation<'a, UnspecifiedParts>) -> Result<Self>
Performs the conversion.
sourceimpl<'a, P> ValidateAmalgamation<'a, Key<P, UnspecifiedRole>> for ErasedKeyAmalgamation<'a, P> where
P: 'a + KeyParts,
impl<'a, P> ValidateAmalgamation<'a, Key<P, UnspecifiedRole>> for ErasedKeyAmalgamation<'a, P> where
P: 'a + KeyParts,
type V = ValidKeyAmalgamation<'a, P, UnspecifiedRole, bool>
type V = ValidKeyAmalgamation<'a, P, UnspecifiedRole, bool>
The type returned by with_policy
. Read more
sourcefn with_policy<T>(self, policy: &'a dyn Policy, time: T) -> Result<Self::V> where
T: Into<Option<SystemTime>>,
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