antimatter_api/models/
policy_rule_operation.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum PolicyRuleOperation {
17 #[serde(rename = "edit")]
18 Edit,
19 #[serde(rename = "view")]
20 View,
21 #[serde(rename = "use")]
22 Use,
23
24}
25
26impl std::fmt::Display for PolicyRuleOperation {
27 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
28 match self {
29 Self::Edit => write!(f, "edit"),
30 Self::View => write!(f, "view"),
31 Self::Use => write!(f, "use"),
32 }
33 }
34}
35
36impl Default for PolicyRuleOperation {
37 fn default() -> PolicyRuleOperation {
38 Self::Edit
39 }
40}
41