[][src]Trait sequoia_openpgp::packet::key::KeyParts

pub trait KeyParts: Debug {
    fn convert_key<R: KeyRole>(
        key: Key<UnspecifiedParts, R>
    ) -> Result<Key<Self, R>>
    where
        Self: Sized
;
fn convert_key_ref<R: KeyRole>(
        key: &Key<UnspecifiedParts, R>
    ) -> Result<&Key<Self, R>>
    where
        Self: Sized
;
fn convert_bundle<R: KeyRole>(
        bundle: KeyBundle<UnspecifiedParts, R>
    ) -> Result<KeyBundle<Self, R>>
    where
        Self: Sized
;
fn convert_bundle_ref<R: KeyRole>(
        bundle: &KeyBundle<UnspecifiedParts, R>
    ) -> Result<&KeyBundle<Self, R>>
    where
        Self: Sized
;
fn convert_key_amalgamation<'a, R: KeyRole>(
        ka: ComponentAmalgamation<'a, Key<UnspecifiedParts, R>>
    ) -> Result<ComponentAmalgamation<'a, Key<Self, R>>>
    where
        Self: Sized
;
fn convert_key_amalgamation_ref<'a, R: KeyRole>(
        ka: &'a ComponentAmalgamation<'a, Key<UnspecifiedParts, R>>
    ) -> Result<&'a ComponentAmalgamation<'a, Key<Self, R>>>
    where
        Self: Sized
; }

A marker trait that indicates whether a Key only contains public key material or may also contains secret key material.

Required methods

fn convert_key<R: KeyRole>(
    key: Key<UnspecifiedParts, R>
) -> Result<Key<Self, R>> where
    Self: Sized

Converts a key with unspecified parts into this kind of key.

fn convert_key_ref<R: KeyRole>(
    key: &Key<UnspecifiedParts, R>
) -> Result<&Key<Self, R>> where
    Self: Sized

Converts a reference to a key with unspecified parts into this kind of key reference.

fn convert_bundle<R: KeyRole>(
    bundle: KeyBundle<UnspecifiedParts, R>
) -> Result<KeyBundle<Self, R>> where
    Self: Sized

Converts a key bundle with unspecified parts into this kind of key bundle.

fn convert_bundle_ref<R: KeyRole>(
    bundle: &KeyBundle<UnspecifiedParts, R>
) -> Result<&KeyBundle<Self, R>> where
    Self: Sized

Converts a reference to a key bundle with unspecified parts into this kind of key bundle reference.

fn convert_key_amalgamation<'a, R: KeyRole>(
    ka: ComponentAmalgamation<'a, Key<UnspecifiedParts, R>>
) -> Result<ComponentAmalgamation<'a, Key<Self, R>>> where
    Self: Sized

Converts a key amalgamation with unspecified parts into this kind of key amalgamation.

fn convert_key_amalgamation_ref<'a, R: KeyRole>(
    ka: &'a ComponentAmalgamation<'a, Key<UnspecifiedParts, R>>
) -> Result<&'a ComponentAmalgamation<'a, Key<Self, R>>> where
    Self: Sized

Converts a reference to a key amalgamation with unspecified parts into this kind of key amalgamation reference.

Loading content...

Implementors

impl KeyParts for PublicParts[src]

fn convert_key_amalgamation_ref<'a, R: KeyRole>(
    ka: &'a ComponentAmalgamation<'a, Key<UnspecifiedParts, R>>
) -> Result<&'a ComponentAmalgamation<'a, Key<Self, R>>>
[src]

Converts a reference to a key amalgamation with unspecified parts into this kind of key amalgamation reference.

impl KeyParts for SecretParts[src]

fn convert_key_amalgamation_ref<'a, R: KeyRole>(
    ka: &'a ComponentAmalgamation<'a, Key<UnspecifiedParts, R>>
) -> Result<&'a ComponentAmalgamation<'a, Key<Self, R>>>
[src]

Converts a reference to a key amalgamation with unspecified parts into this kind of key amalgamation reference.

impl KeyParts for UnspecifiedParts[src]

fn convert_key_amalgamation_ref<'a, R: KeyRole>(
    ka: &'a ComponentAmalgamation<'a, Key<UnspecifiedParts, R>>
) -> Result<&'a ComponentAmalgamation<'a, Key<Self, R>>>
[src]

Converts a reference to a key amalgamation with unspecified parts into this kind of key amalgamation reference.

Loading content...