Skip to main content

ical/tree/component/
vtimezone.rs

1//! # VTIMEZONE component lens
2//!
3//! The `VTIMEZONE` component lens.
4
5use crate::{
6    component::IcalComponentKind,
7    prop::IcalPropKind,
8    tree::component::{IcalComponentLens, IcalComponentSpec},
9};
10
11/// The `VTIMEZONE` component lens.
12#[allow(non_camel_case_types)]
13pub struct VTIMEZONE;
14
15impl IcalComponentLens for VTIMEZONE {}
16
17impl IcalComponentSpec for VTIMEZONE {
18    const KIND: IcalComponentKind = IcalComponentKind::VTimezone;
19
20    fn allowed_children() -> &'static [IcalComponentKind] {
21        &[IcalComponentKind::Standard, IcalComponentKind::Daylight]
22    }
23
24    fn required_props() -> &'static [IcalPropKind] {
25        &[IcalPropKind::TzId]
26    }
27}