#[non_exhaustive]pub enum KeyHandle {
EcdsaNistP256(VerifyingKey),
EcdsaNistP384(VerifyingKey),
EcdsaSecp256k1(VerifyingKey),
Ed25519(VerifyingKey),
}
Expand description
Handle to a particular key.
Uniquely identifies a particular key in the keyring.
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.
EcdsaNistP256(VerifyingKey)
Available on crate feature
nistp256
only.ECDSA/P-256.
EcdsaNistP384(VerifyingKey)
Available on crate feature
nistp384
only.ECDSA/P-384.
EcdsaSecp256k1(VerifyingKey)
Available on crate feature
secp256k1
only.ECDSA/secp256k1.
Ed25519(VerifyingKey)
Available on crate feature
ed25519
only.Ed25519.
Implementations§
Source§impl KeyHandle
impl KeyHandle
Sourcepub fn ecdsa_nistp256(&self) -> Option<VerifyingKey>
Available on crate feature nistp256
only.
pub fn ecdsa_nistp256(&self) -> Option<VerifyingKey>
nistp256
only.Get ECDSA/P-256 verifying key, if this is an ECDSA/P-256 key.
Sourcepub fn ecdsa_nistp384(&self) -> Option<VerifyingKey>
Available on crate feature nistp384
only.
pub fn ecdsa_nistp384(&self) -> Option<VerifyingKey>
nistp384
only.Get ECDSA/P-384 verifying key, if this is an ECDSA/P-384 key.
Sourcepub fn ecdsa_secp256k1(&self) -> Option<VerifyingKey>
Available on crate feature secp256k1
only.
pub fn ecdsa_secp256k1(&self) -> Option<VerifyingKey>
secp256k1
only.Get ECDSA/secp256k1 verifying key, if this is an ECDSA/secp256k1 key.
Sourcepub fn ed25519(&self) -> Option<VerifyingKey>
Available on crate feature ed25519
only.
pub fn ed25519(&self) -> Option<VerifyingKey>
ed25519
only.Get Ed25519 verifying key, if this is an Ed25519 key.
Trait Implementations§
Source§impl Ord for KeyHandle
impl Ord for KeyHandle
Source§impl PartialOrd for KeyHandle
impl PartialOrd for KeyHandle
impl Copy for KeyHandle
impl Eq for KeyHandle
impl StructuralPartialEq for KeyHandle
Auto Trait Implementations§
impl Freeze for KeyHandle
impl RefUnwindSafe for KeyHandle
impl Send for KeyHandle
impl Sync for KeyHandle
impl Unpin for KeyHandle
impl UnwindSafe for KeyHandle
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