1use std::ops::Deref;
2
3#[allow(clippy::module_name_repetitions)]
6#[derive(Clone, Debug)]
7pub struct TagVal(String);
8
9impl TagVal {
10 #[must_use]
11 pub fn as_str(&self) -> &str {
12 self.0.as_str()
13 }
14}
15
16impl Deref for TagVal {
17 type Target = String;
18
19 fn deref(&self) -> &Self::Target {
20 &self.0
21 }
22}
23
24impl From<&str> for TagVal {
25 fn from(val: &str) -> Self {
26 TagVal(val.to_owned())
27 }
28}
29
30impl From<String> for TagVal {
31 fn from(val: String) -> Self {
32 TagVal(val)
33 }
34}