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