fusionauth_rust_client/models/
cose_elliptic_curve.rs

1/*
2 * FusionAuth API
3 *
4 * This is a FusionAuth server. Find out more at [https://fusionauth.io](https://fusionauth.io). You need to [set up an API key](https://fusionauth.io/docs/v1/tech/apis/authentication#managing-api-keys) in the FusionAuth instance you are using to test out the API calls.
5 *
6 * The version of the OpenAPI document: 1.60.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CoseEllipticCurve : COSE Elliptic Curve identifier to determine which elliptic curve to use with a given key
15/// COSE Elliptic Curve identifier to determine which elliptic curve to use with a given key
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum CoseEllipticCurve {
18    #[serde(rename = "Reserved")]
19    Reserved,
20    #[serde(rename = "P256")]
21    P256,
22    #[serde(rename = "P384")]
23    P384,
24    #[serde(rename = "P521")]
25    P521,
26    #[serde(rename = "X25519")]
27    X25519,
28    #[serde(rename = "X448")]
29    X448,
30    #[serde(rename = "Ed25519")]
31    Ed25519,
32    #[serde(rename = "Ed448")]
33    Ed448,
34    #[serde(rename = "Secp256k1")]
35    Secp256k1,
36
37}
38
39impl std::fmt::Display for CoseEllipticCurve {
40    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
41        match self {
42            Self::Reserved => write!(f, "Reserved"),
43            Self::P256 => write!(f, "P256"),
44            Self::P384 => write!(f, "P384"),
45            Self::P521 => write!(f, "P521"),
46            Self::X25519 => write!(f, "X25519"),
47            Self::X448 => write!(f, "X448"),
48            Self::Ed25519 => write!(f, "Ed25519"),
49            Self::Ed448 => write!(f, "Ed448"),
50            Self::Secp256k1 => write!(f, "Secp256k1"),
51        }
52    }
53}
54
55impl Default for CoseEllipticCurve {
56    fn default() -> CoseEllipticCurve {
57        Self::Reserved
58    }
59}
60