ical/prop/method.rs
1//! # METHOD
2//!
3//! The `METHOD` property: the iTIP method the calendar carries: `REQUEST`,
4//! `REPLY`, `CANCEL`, ... (RFC 5545 3.7.2).
5
6use crate::{
7 prop::{IcalPropKind, cardinality::IcalPropCardinality, spec::IcalPropSpec},
8 version::IcalVersion,
9};
10
11/// The `METHOD` property marker.
12pub struct METHOD;
13
14impl IcalPropSpec for METHOD {
15 const KIND: IcalPropKind = IcalPropKind::Method;
16
17 fn allowed_versions() -> &'static [IcalVersion] {
18 &[IcalVersion::V2_0]
19 }
20
21 fn cardinality(_version: IcalVersion) -> IcalPropCardinality {
22 IcalPropCardinality::AtMostOne
23 }
24}