Skip to main content

ical/prop/
exdate.rs

1//! # EXDATE
2//!
3//! The `EXDATE` property: the dates removed from the recurrence set (RFC 5545
4//! 3.8.5.1).
5
6use crate::{
7    prop::{IcalPropKind, spec::IcalPropSpec},
8    value::IcalValueKind,
9    version::IcalVersion,
10};
11
12/// The `EXDATE` property marker.
13pub struct EXDATE;
14
15impl IcalPropSpec for EXDATE {
16    const KIND: IcalPropKind = IcalPropKind::ExDate;
17
18    fn allowed_values(_version: IcalVersion) -> &'static [IcalValueKind] {
19        &[IcalValueKind::DateTimeList]
20    }
21
22    /// A list whatever its items are: a declared `DATE`, `DATE-TIME` or
23    /// `PERIOD` describes each item, not the value as a whole, and every item
24    /// is kept as raw text.
25    fn value(_version: IcalVersion, _declared: Option<IcalValueKind>) -> IcalValueKind {
26        IcalValueKind::DateTimeList
27    }
28}