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};
12use serde_repr::{Deserialize_repr, Serialize_repr};
13
14use crate::models;
15///
16#[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}