use alloc::{borrow::Cow, string::String, vec::Vec};
#[derive(Clone, Debug, Default, PartialEq, Eq)]
pub struct VcardText<'a>(pub Cow<'a, str>);
impl<'a> From<&'a str> for VcardText<'a> {
fn from(value: &'a str) -> Self {
Self(Cow::Borrowed(value))
}
}
impl From<String> for VcardText<'_> {
fn from(value: String) -> Self {
Self(Cow::Owned(value))
}
}
impl<'a> From<Cow<'a, str>> for VcardText<'a> {
fn from(value: Cow<'a, str>) -> Self {
Self(value)
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq)]
pub struct VcardTextList<'a>(pub Vec<Cow<'a, str>>);
impl<'a> From<Vec<Cow<'a, str>>> for VcardTextList<'a> {
fn from(values: Vec<Cow<'a, str>>) -> Self {
Self(values)
}
}