Skip to main content

bitwarden_api_api/models/
public_key_credential_type.rs

1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15///
16#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum PublicKeyCredentialType {
18    #[serde(rename = "public-key")]
19    PublicKey,
20
21    /// Unknown value returned from the server. This is used to handle forward compatibility.
22    #[serde(untagged)]
23    __Unknown(String),
24}
25
26impl std::fmt::Display for PublicKeyCredentialType {
27    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
28        match self {
29            Self::PublicKey => write!(f, "public-key"),
30            Self::__Unknown(s) => write!(f, "{}", s),
31        }
32    }
33}
34
35impl Default for PublicKeyCredentialType {
36    fn default() -> PublicKeyCredentialType {
37        Self::PublicKey
38    }
39}