ical/value/
cal_address.rs1use alloc::{borrow::Cow, string::String};
11
12#[derive(Clone, Debug, Default, PartialEq, Eq)]
14pub struct IcalCalAddress<'a>(pub Cow<'a, str>);
15
16impl<'a> From<&'a str> for IcalCalAddress<'a> {
17 fn from(value: &'a str) -> Self {
18 Self(Cow::Borrowed(value))
19 }
20}
21
22impl From<String> for IcalCalAddress<'_> {
23 fn from(value: String) -> Self {
24 Self(Cow::Owned(value))
25 }
26}
27
28impl<'a> From<Cow<'a, str>> for IcalCalAddress<'a> {
29 fn from(value: Cow<'a, str>) -> Self {
30 Self(value)
31 }
32}