1use alloc::{borrow::Cow, string::String, vec::Vec};
12
13#[derive(Clone, Debug, Default, PartialEq, Eq)]
15pub struct IcalText<'a>(pub Cow<'a, str>);
16
17impl<'a> From<&'a str> for IcalText<'a> {
18 fn from(value: &'a str) -> Self {
19 Self(Cow::Borrowed(value))
20 }
21}
22
23impl From<String> for IcalText<'_> {
24 fn from(value: String) -> Self {
25 Self(Cow::Owned(value))
26 }
27}
28
29impl<'a> From<Cow<'a, str>> for IcalText<'a> {
30 fn from(value: Cow<'a, str>) -> Self {
31 Self(value)
32 }
33}
34
35#[derive(Clone, Debug, Default, PartialEq, Eq)]
37pub struct IcalTextList<'a>(pub Vec<Cow<'a, str>>);
38
39impl<'a> From<Vec<Cow<'a, str>>> for IcalTextList<'a> {
40 fn from(values: Vec<Cow<'a, str>>) -> Self {
41 Self(values)
42 }
43}