Skip to main content

ical/component/
valarm.rs

1//! # VALARM
2//!
3//! The `VALARM` component: an alarm on the component holding it (RFC 5545
4//! 3.6.6).
5
6use crate::{
7    component::{IcalComponentKind, spec::IcalComponentSpec},
8    prop::IcalPropKind,
9};
10
11/// The `VALARM` component marker.
12pub struct VALARM;
13
14impl IcalComponentSpec for VALARM {
15    const KIND: IcalComponentKind = IcalComponentKind::VAlarm;
16
17    fn allowed_children() -> &'static [IcalComponentKind] {
18        &[IcalComponentKind::VLocation]
19    }
20
21    fn required_props() -> &'static [IcalPropKind] {
22        &[IcalPropKind::Action, IcalPropKind::Trigger]
23    }
24}