Enum coset::iana::EllipticCurve
source · #[non_exhaustive]pub enum EllipticCurve {
Reserved = 0,
P_256 = 1,
P_384 = 2,
P_521 = 3,
X25519 = 4,
X448 = 5,
Ed25519 = 6,
Ed448 = 7,
Secp256k1 = 8,
}
Expand description
IANA-registered COSE elliptic curves.
From IANA registry https://www.iana.org/assignments/cose/cose.xhtml#elliptic-curves as of 2021-03-19.
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.
Reserved = 0
P_256 = 1
EC2: NIST P-256 also known as secp256r1
P_384 = 2
EC2: NIST P-384 also known as secp384r1
P_521 = 3
EC2: NIST P-521 also known as secp521r1
X25519 = 4
OKP: X25519 for use w/ ECDH only
X448 = 5
OKP: X448 for use w/ ECDH only
Ed25519 = 6
OKP: Ed25519 for use w/ EdDSA only
Ed448 = 7
OKP: Ed448 for use w/ EdDSA only
Secp256k1 = 8
EC2: SECG secp256k1 curve
Trait Implementations§
source§impl Clone for EllipticCurve
impl Clone for EllipticCurve
source§fn clone(&self) -> EllipticCurve
fn clone(&self) -> EllipticCurve
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 EllipticCurve
impl Debug for EllipticCurve
source§impl EnumI64 for EllipticCurve
impl EnumI64 for EllipticCurve
source§impl Ord for EllipticCurve
impl Ord for EllipticCurve
source§fn cmp(&self, other: &EllipticCurve) -> Ordering
fn cmp(&self, other: &EllipticCurve) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for EllipticCurve
impl PartialEq for EllipticCurve
source§fn eq(&self, other: &EllipticCurve) -> bool
fn eq(&self, other: &EllipticCurve) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for EllipticCurve
impl PartialOrd for EllipticCurve
source§fn partial_cmp(&self, other: &EllipticCurve) -> Option<Ordering>
fn partial_cmp(&self, other: &EllipticCurve) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl WithPrivateRange for EllipticCurve
impl WithPrivateRange for EllipticCurve
fn is_private(i: i64) -> bool
impl Copy for EllipticCurve
impl Eq for EllipticCurve
impl StructuralPartialEq for EllipticCurve
Auto Trait Implementations§
impl Freeze for EllipticCurve
impl RefUnwindSafe for EllipticCurve
impl Send for EllipticCurve
impl Sync for EllipticCurve
impl Unpin for EllipticCurve
impl UnwindSafe for EllipticCurve
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