bitwarden_api_api/models/
authenticator_transport.rs1use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum AuthenticatorTransport {
18 #[serde(rename = "usb")]
19 Usb,
20 #[serde(rename = "nfc")]
21 Nfc,
22 #[serde(rename = "ble")]
23 Ble,
24 #[serde(rename = "internal")]
25 Internal,
26}
27
28impl std::fmt::Display for AuthenticatorTransport {
29 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
30 match self {
31 Self::Usb => write!(f, "usb"),
32 Self::Nfc => write!(f, "nfc"),
33 Self::Ble => write!(f, "ble"),
34 Self::Internal => write!(f, "internal"),
35 }
36 }
37}
38
39impl Default for AuthenticatorTransport {
40 fn default() -> AuthenticatorTransport {
41 Self::Usb
42 }
43}