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}
27
28impl std::fmt::Display for ClientType {
29 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
30 write!(
31 f,
32 "{}",
33 match self {
34 Self::All => "0",
35 Self::Web => "1",
36 Self::Browser => "2",
37 Self::Desktop => "3",
38 Self::Mobile => "4",
39 }
40 )
41 }
42}
43impl Default for ClientType {
44 fn default() -> ClientType {
45 Self::All
46 }
47}