#[non_exhaustive]
pub enum KeyData {
    Dsa(DsaPublicKey),
    Ecdsa(EcdsaPublicKey),
    Ed25519(Ed25519PublicKey),
    Rsa(RsaPublicKey),
}Expand description
Public key data.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Dsa(DsaPublicKey)
alloc only.Digital Signature Algorithm (DSA) public key data.
Ecdsa(EcdsaPublicKey)
ecdsa only.Elliptic Curve Digital Signature Algorithm (ECDSA) public key data.
Ed25519(Ed25519PublicKey)
Ed25519 public key data.
Rsa(RsaPublicKey)
alloc only.RSA public key data.
Implementations
sourceimpl KeyData
 
impl KeyData
sourcepub fn dsa(&self) -> Option<&DsaPublicKey>
 This is supported on crate feature alloc only.
pub fn dsa(&self) -> Option<&DsaPublicKey>
alloc only.Get DSA public key if this key is the correct type.
sourcepub fn ecdsa(&self) -> Option<&EcdsaPublicKey>
 This is supported on crate feature ecdsa only.
pub fn ecdsa(&self) -> Option<&EcdsaPublicKey>
ecdsa only.Get ECDSA public key if this key is the correct type.
sourcepub fn ed25519(&self) -> Option<&Ed25519PublicKey>
 
pub fn ed25519(&self) -> Option<&Ed25519PublicKey>
Get Ed25519 public key if this key is the correct type.
sourcepub fn rsa(&self) -> Option<&RsaPublicKey>
 This is supported on crate feature alloc only.
pub fn rsa(&self) -> Option<&RsaPublicKey>
alloc only.Get RSA public key if this key is the correct type.
sourcepub fn is_dsa(&self) -> bool
 This is supported on crate feature alloc only.
pub fn is_dsa(&self) -> bool
alloc only.Is this key a DSA key?
sourcepub fn is_ecdsa(&self) -> bool
 This is supported on crate feature ecdsa only.
pub fn is_ecdsa(&self) -> bool
ecdsa only.Is this key an ECDSA key?
sourcepub fn is_ed25519(&self) -> bool
 
pub fn is_ed25519(&self) -> bool
Is this key an Ed25519 key?
Trait Implementations
sourceimpl From<&'_ KeypairData> for KeyData
 
impl From<&'_ KeypairData> for KeyData
sourcefn from(keypair_data: &KeypairData) -> KeyData
 
fn from(keypair_data: &KeypairData) -> KeyData
Performs the conversion.
sourceimpl Ord for KeyData
 
impl Ord for KeyData
sourceimpl PartialOrd<KeyData> for KeyData
 
impl PartialOrd<KeyData> for KeyData
sourcefn partial_cmp(&self, other: &KeyData) -> Option<Ordering>
 
fn partial_cmp(&self, other: &KeyData) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
 
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
 
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Eq for KeyData
impl StructuralEq for KeyData
impl StructuralPartialEq for KeyData
Auto Trait Implementations
impl RefUnwindSafe for KeyData
impl Send for KeyData
impl Sync for KeyData
impl Unpin for KeyData
impl UnwindSafe for KeyData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
    T: Clone, 
 
impl<T> ToOwned for T where
    T: Clone, 
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
 
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more