Skip to main content

ical/tree/component/
vavailability.rs

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