bitwarden_api_api/models/
authenticator_transport.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, 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}