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