1use alloc::{borrow::Cow, string::String, vec::Vec};
21
22#[derive(Clone, Debug, Default, PartialEq, Eq)]
24pub struct IcalDate<'a>(pub Cow<'a, str>);
25
26impl<'a> From<&'a str> for IcalDate<'a> {
27 fn from(value: &'a str) -> Self {
28 Self(Cow::Borrowed(value))
29 }
30}
31
32impl From<String> for IcalDate<'_> {
33 fn from(value: String) -> Self {
34 Self(Cow::Owned(value))
35 }
36}
37
38impl<'a> From<Cow<'a, str>> for IcalDate<'a> {
39 fn from(value: Cow<'a, str>) -> Self {
40 Self(value)
41 }
42}
43
44#[derive(Clone, Debug, Default, PartialEq, Eq)]
51pub struct IcalDateTimeList<'a>(pub Vec<Cow<'a, str>>);
52
53impl<'a> From<Vec<Cow<'a, str>>> for IcalDateTimeList<'a> {
54 fn from(values: Vec<Cow<'a, str>>) -> Self {
55 Self(values)
56 }
57}
58
59#[derive(Clone, Debug, Default, PartialEq, Eq)]
62pub struct IcalDateTime<'a>(pub Cow<'a, str>);
63
64impl<'a> From<&'a str> for IcalDateTime<'a> {
65 fn from(value: &'a str) -> Self {
66 Self(Cow::Borrowed(value))
67 }
68}
69
70impl From<String> for IcalDateTime<'_> {
71 fn from(value: String) -> Self {
72 Self(Cow::Owned(value))
73 }
74}
75
76impl<'a> From<Cow<'a, str>> for IcalDateTime<'a> {
77 fn from(value: Cow<'a, str>) -> Self {
78 Self(value)
79 }
80}
81
82#[derive(Clone, Debug, Default, PartialEq, Eq)]
84pub struct IcalTime<'a>(pub Cow<'a, str>);
85
86impl<'a> From<&'a str> for IcalTime<'a> {
87 fn from(value: &'a str) -> Self {
88 Self(Cow::Borrowed(value))
89 }
90}
91
92impl From<String> for IcalTime<'_> {
93 fn from(value: String) -> Self {
94 Self(Cow::Owned(value))
95 }
96}
97
98impl<'a> From<Cow<'a, str>> for IcalTime<'a> {
99 fn from(value: Cow<'a, str>) -> Self {
100 Self(value)
101 }
102}