bitwarden_api_api/models/
uri_match_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 UriMatchType {
21 Domain = 0,
22 Host = 1,
23 StartsWith = 2,
24 Exact = 3,
25 RegularExpression = 4,
26 Never = 5,
27}
28
29impl std::fmt::Display for UriMatchType {
30 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
31 write!(
32 f,
33 "{}",
34 match self {
35 Self::Domain => "0",
36 Self::Host => "1",
37 Self::StartsWith => "2",
38 Self::Exact => "3",
39 Self::RegularExpression => "4",
40 Self::Never => "5",
41 }
42 )
43 }
44}
45impl Default for UriMatchType {
46 fn default() -> UriMatchType {
47 Self::Domain
48 }
49}