bitwarden_api_api/models/
auth_type.rs1use serde::{Deserialize, Serialize};
12use serde_repr::{Deserialize_repr, Serialize_repr};
13
14use crate::models;
15#[repr(i64)]
18#[derive(
19 Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr,
20)]
21pub enum AuthType {
22 Email = 0,
23 Password = 1,
24 None = 2,
25}
26
27impl std::fmt::Display for AuthType {
28 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29 write!(
30 f,
31 "{}",
32 match self {
33 Self::Email => "0",
34 Self::Password => "1",
35 Self::None => "2",
36 }
37 )
38 }
39}
40impl Default for AuthType {
41 fn default() -> AuthType {
42 Self::Email
43 }
44}