Skip to main content

ical/prop/
acknowledged.rs

1//! # ACKNOWLEDGED
2//!
3//! The `ACKNOWLEDGED` property: when an alarm was last dismissed, so a client
4//! knows not to fire it again (RFC 9074 6.1).
5
6use crate::{
7    prop::{IcalPropKind, cardinality::IcalPropCardinality, spec::IcalPropSpec},
8    value::IcalValueKind,
9    version::IcalVersion,
10};
11
12/// The `ACKNOWLEDGED` property marker.
13pub struct ACKNOWLEDGED;
14
15impl IcalPropSpec for ACKNOWLEDGED {
16    const KIND: IcalPropKind = IcalPropKind::Acknowledged;
17
18    fn allowed_versions() -> &'static [IcalVersion] {
19        &[IcalVersion::V2_0]
20    }
21
22    fn cardinality(_version: IcalVersion) -> IcalPropCardinality {
23        IcalPropCardinality::AtMostOne
24    }
25
26    fn allowed_values(_version: IcalVersion) -> &'static [IcalValueKind] {
27        &[IcalValueKind::DateTime]
28    }
29}