Skip to main content

ical/component/
vevent.rs

1//! # VEVENT
2//!
3//! The `VEVENT` component: a scheduled event (RFC 5545 3.6.1).
4
5use crate::{
6    component::{IcalComponentKind, spec::IcalComponentSpec},
7    prop::IcalPropKind,
8};
9
10/// The `VEVENT` component marker.
11pub struct VEVENT;
12
13impl IcalComponentSpec for VEVENT {
14    const KIND: IcalComponentKind = IcalComponentKind::VEvent;
15
16    fn allowed_children() -> &'static [IcalComponentKind] {
17        &[
18            IcalComponentKind::VAlarm,
19            IcalComponentKind::Participant,
20            IcalComponentKind::VLocation,
21            IcalComponentKind::VResource,
22        ]
23    }
24
25    fn required_props() -> &'static [IcalPropKind] {
26        &[IcalPropKind::Uid, IcalPropKind::DtStamp]
27    }
28}