Enum pgp::composed::signed_key::PublicOrSecret
source · pub enum PublicOrSecret {
Public(SignedPublicKey),
Secret(SignedSecretKey),
}
Variants§
Public(SignedPublicKey)
Secret(SignedSecretKey)
Implementations§
source§impl PublicOrSecret
impl PublicOrSecret
pub fn verify(&self) -> Result<()>
pub fn to_armored_writer( &self, writer: &mut impl Write, headers: Option<&BTreeMap<String, String>> ) -> Result<()>
pub fn to_armored_bytes( &self, headers: Option<&BTreeMap<String, String>> ) -> Result<Vec<u8>>
pub fn to_armored_string( &self, headers: Option<&BTreeMap<String, String>> ) -> Result<String>
sourcepub fn into_secret(self) -> SignedSecretKey
pub fn into_secret(self) -> SignedSecretKey
Panics if not a secret key.
sourcepub fn into_public(self) -> SignedPublicKey
pub fn into_public(self) -> SignedPublicKey
Panics if not a public key.
pub fn is_public(&self) -> bool
pub fn is_secret(&self) -> bool
Trait Implementations§
source§impl Clone for PublicOrSecret
impl Clone for PublicOrSecret
source§fn clone(&self) -> PublicOrSecret
fn clone(&self) -> PublicOrSecret
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PublicOrSecret
impl Debug for PublicOrSecret
source§impl KeyTrait for PublicOrSecret
impl KeyTrait for PublicOrSecret
source§impl PartialEq for PublicOrSecret
impl PartialEq for PublicOrSecret
source§fn eq(&self, other: &PublicOrSecret) -> bool
fn eq(&self, other: &PublicOrSecret) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PublicOrSecret
impl Serialize for PublicOrSecret
impl Eq for PublicOrSecret
impl StructuralPartialEq for PublicOrSecret
Auto Trait Implementations§
impl RefUnwindSafe for PublicOrSecret
impl Send for PublicOrSecret
impl Sync for PublicOrSecret
impl Unpin for PublicOrSecret
impl UnwindSafe for PublicOrSecret
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more