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