use crate::{
param::IcalParamKind,
prop::IcalPropKind,
tree::{
line::IcalLine,
prop::{IcalPropLens, IcalPropSpec},
value::IcalValueCursor,
},
value::IcalValueKind,
value::cal_address::IcalCalAddress,
version::IcalVersion,
};
#[allow(non_camel_case_types)]
pub struct ATTENDEE;
impl IcalPropLens for ATTENDEE {
type Target<'v> = IcalCalAddress<'v>;
type Cursor<'c, 'a>
= IcalValueCursor<'c, 'a>
where
'a: 'c;
fn cursor<'c, 'a>(line: &'c mut IcalLine<'a>) -> IcalValueCursor<'c, 'a> {
IcalValueCursor { line }
}
}
impl IcalPropSpec for ATTENDEE {
const KIND: IcalPropKind = IcalPropKind::Attendee;
fn allowed_values(_version: IcalVersion) -> &'static [IcalValueKind] {
&[IcalValueKind::CalAddress]
}
fn allowed_params(_version: IcalVersion) -> &'static [IcalParamKind] {
&[
IcalParamKind::Language,
IcalParamKind::Cn,
IcalParamKind::CuType,
IcalParamKind::DelegatedFrom,
IcalParamKind::DelegatedTo,
IcalParamKind::Dir,
IcalParamKind::Member,
IcalParamKind::PartStat,
IcalParamKind::Role,
IcalParamKind::Rsvp,
IcalParamKind::SentBy,
IcalParamKind::Email,
IcalParamKind::Value,
IcalParamKind::ScheduleAgent,
IcalParamKind::ScheduleForceSend,
IcalParamKind::ScheduleStatus,
]
}
}