bitwarden_api_api/models/
uri_match_type.rs

1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15///
16#[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 UriMatchType {
30    Domain = 0,
31    Host = 1,
32    StartsWith = 2,
33    Exact = 3,
34    RegularExpression = 4,
35    Never = 5,
36}
37
38impl std::fmt::Display for UriMatchType {
39    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
40        match self {
41            Self::Domain => write!(f, "0"),
42            Self::Host => write!(f, "1"),
43            Self::StartsWith => write!(f, "2"),
44            Self::Exact => write!(f, "3"),
45            Self::RegularExpression => write!(f, "4"),
46            Self::Never => write!(f, "5"),
47        }
48    }
49}
50
51impl Default for UriMatchType {
52    fn default() -> UriMatchType {
53        Self::Domain
54    }
55}