Skip to main content

ical/tree/component/
daylight.rs

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