[][src]Enum pgp::composed::signed_key::shared::PublicOrSecret

pub enum PublicOrSecret {
    Public(SignedPublicKey),
    Secret(SignedSecretKey),
}

Variants

Methods

impl PublicOrSecret[src]

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

pub fn to_armored_writer(
    &self,
    writer: &mut impl Write,
    headers: Option<&BTreeMap<String, String>>
) -> Result<()>
[src]

pub fn to_armored_bytes(
    &self,
    headers: Option<&BTreeMap<String, String>>
) -> Result<Vec<u8>>
[src]

pub fn to_armored_string(
    &self,
    headers: Option<&BTreeMap<String, String>>
) -> Result<String>
[src]

pub fn into_secret(self) -> SignedSecretKey[src]

Panics if not a secret key.

pub fn into_public(self) -> SignedPublicKey[src]

Panics if not a public key.

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

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

Trait Implementations

impl Serialize for PublicOrSecret[src]

impl KeyTrait for PublicOrSecret[src]

fn fingerprint(&self) -> Vec<u8>[src]

Returns the fingerprint of the key.

fn key_id(&self) -> KeyId[src]

Returns the Key ID of the key.

impl Clone for PublicOrSecret[src]

impl Eq for PublicOrSecret[src]

impl PartialEq<PublicOrSecret> for PublicOrSecret[src]

impl Debug for PublicOrSecret[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for 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<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Err = <U as TryFrom<T>>::Err