Skip to main content

ical/component/
vtodo.rs

1//! # VTODO
2//!
3//! The `VTODO` component: a to-do item (RFC 5545 3.6.2).
4
5use crate::{
6    component::{IcalComponentKind, spec::IcalComponentSpec},
7    prop::IcalPropKind,
8};
9
10/// The `VTODO` component marker.
11pub struct VTODO;
12
13impl IcalComponentSpec for VTODO {
14    const KIND: IcalComponentKind = IcalComponentKind::VTodo;
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}