bitwarden_api_api/models/
organization_user_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 OrganizationUserType {
21 Owner = 0,
22 Admin = 1,
23 User = 2,
24 Custom = 4,
25}
26
27impl std::fmt::Display for OrganizationUserType {
28 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29 write!(
30 f,
31 "{}",
32 match self {
33 Self::Owner => "0",
34 Self::Admin => "1",
35 Self::User => "2",
36 Self::Custom => "4",
37 }
38 )
39 }
40}
41impl Default for OrganizationUserType {
42 fn default() -> OrganizationUserType {
43 Self::Owner
44 }
45}