bitwarden_api_api/models/
authenticator_attachment.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 AuthenticatorAttachment {
18    #[serde(rename = "platform")]
19    Platform,
20    #[serde(rename = "cross-platform")]
21    CrossPlatform,
22
23    /// Unknown value returned from the server. This is used to handle forward compatibility.
24    #[serde(untagged)]
25    __Unknown(String),
26}
27
28impl std::fmt::Display for AuthenticatorAttachment {
29    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
30        match self {
31            Self::Platform => write!(f, "platform"),
32            Self::CrossPlatform => write!(f, "cross-platform"),
33            Self::__Unknown(s) => write!(f, "{}", s),
34        }
35    }
36}
37
38impl Default for AuthenticatorAttachment {
39    fn default() -> AuthenticatorAttachment {
40        Self::Platform
41    }
42}