Enum ssh_key::private::KeypairData
source · [−]#[non_exhaustive]
pub enum KeypairData {
Dsa(DsaKeypair),
Ecdsa(EcdsaKeypair),
Ed25519(Ed25519Keypair),
Rsa(RsaKeypair),
}Expand description
Private key data.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Dsa(DsaKeypair)
This is supported on crate feature
alloc only.Digital Signature Algorithm (DSA) keypair.
Ecdsa(EcdsaKeypair)
This is supported on crate feature
ecdsa only.ECDSA keypair.
Ed25519(Ed25519Keypair)
Ed25519 keypair.
Rsa(RsaKeypair)
This is supported on crate feature
alloc only.RSA keypair.
Implementations
sourceimpl KeypairData
impl KeypairData
sourcepub fn dsa(&self) -> Option<&DsaKeypair>
This is supported on crate feature alloc only.
pub fn dsa(&self) -> Option<&DsaKeypair>
This is supported on crate feature
alloc only.Get DSA keypair if this key is the correct type.
sourcepub fn ecdsa(&self) -> Option<&EcdsaKeypair>
This is supported on crate feature ecdsa only.
pub fn ecdsa(&self) -> Option<&EcdsaKeypair>
This is supported on crate feature
ecdsa only.Get ECDSA private key if this key is the correct type.
sourcepub fn ed25519(&self) -> Option<&Ed25519Keypair>
pub fn ed25519(&self) -> Option<&Ed25519Keypair>
Get Ed25519 private key if this key is the correct type.
sourcepub fn rsa(&self) -> Option<&RsaKeypair>
This is supported on crate feature alloc only.
pub fn rsa(&self) -> Option<&RsaKeypair>
This is supported on crate feature
alloc only.Get RSA keypair 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
This is supported on crate feature
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
This is supported on crate feature
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 Clone for KeypairData
impl Clone for KeypairData
sourcefn clone(&self) -> KeypairData
fn clone(&self) -> KeypairData
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl ConstantTimeEq for KeypairData
This is supported on crate feature subtle only.
impl ConstantTimeEq for KeypairData
This is supported on crate feature
subtle only.sourceimpl Debug for KeypairData
impl Debug for KeypairData
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 From<KeypairData> for PrivateKey
impl From<KeypairData> for PrivateKey
sourcefn from(key_data: KeypairData) -> PrivateKey
fn from(key_data: KeypairData) -> PrivateKey
Performs the conversion.
sourceimpl PartialEq<KeypairData> for KeypairData
This is supported on crate feature subtle only.
impl PartialEq<KeypairData> for KeypairData
This is supported on crate feature
subtle only.impl Eq for KeypairData
This is supported on crate feature
subtle only.Auto Trait Implementations
impl RefUnwindSafe for KeypairData
impl Send for KeypairData
impl Sync for KeypairData
impl Unpin for KeypairData
impl UnwindSafe for KeypairData
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)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more