Skip to main content

ical/prop/
rnum.rs

1//! # RNUM
2//!
3//! The `RNUM` property: how many occurrences a vCalendar 1.0 recurrence rule
4//! generates (vCalendar 1.0).
5
6use crate::{
7    prop::{IcalPropKind, spec::IcalPropSpec},
8    value::IcalValueKind,
9    version::IcalVersion,
10};
11
12/// The `RNUM` property marker.
13pub struct RNUM;
14
15impl IcalPropSpec for RNUM {
16    const KIND: IcalPropKind = IcalPropKind::RNum;
17
18    fn allowed_versions() -> &'static [IcalVersion] {
19        &[IcalVersion::V1_0]
20    }
21
22    fn allowed_values(_version: IcalVersion) -> &'static [IcalValueKind] {
23        &[IcalValueKind::Integer]
24    }
25}