#[non_exhaustive]pub enum KeyType {
Ed25519,
X25519,
P256,
P384,
P521,
Secp256k1,
Bls12381G2,
Unknown,
}Expand description
Known cryptographic key types.
This enum is #[non_exhaustive]: new algorithms (hybrid schemes, future
NIST standards, vendor-specific key types) will be added in minor
releases without breaking match-all arms.
No Default impl is provided on purpose: a key without a known
algorithm is a programming error in this crate, not a sensible
default state. KeyType::Unknown exists for parsing paths that
receive an unrecognised curve or codec identifier.
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.
Ed25519
X25519
P256
P384
P521
Secp256k1
Bls12381G2
BLS12-381 G2 public key — the verification key of a BBS+ issuer
(bbs-2023 Data-Integrity cryptosuite). A 96-byte compressed G2 point,
multicodec 0xeb.
Unknown
Unrecognised or unsupported key type. Produced by parsing paths on unknown curve identifiers; should never be constructed directly.
Trait Implementations§
impl Copy for KeyType
Source§impl<'de> Deserialize<'de> for KeyType
impl<'de> Deserialize<'de> for KeyType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for KeyType
impl StructuralPartialEq for KeyType
Auto Trait Implementations§
impl Freeze for KeyType
impl RefUnwindSafe for KeyType
impl Send for KeyType
impl Sync for KeyType
impl Unpin for KeyType
impl UnsafeUnpin for KeyType
impl UnwindSafe for KeyType
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