bitwarden_api_api/models/
authenticator_attachment.rs1use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Copy, 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
24impl std::fmt::Display for AuthenticatorAttachment {
25 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
26 match self {
27 Self::Platform => write!(f, "platform"),
28 Self::CrossPlatform => write!(f, "cross-platform"),
29 }
30 }
31}
32
33impl Default for AuthenticatorAttachment {
34 fn default() -> AuthenticatorAttachment {
35 Self::Platform
36 }
37}