Skip to main content

ical/tree/component/
standard.rs

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