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