Skip to main content

ical/prop/
priority.rs

1//! # PRIORITY
2//!
3//! The `PRIORITY` property: the relative priority of the component, 0
4//! (undefined) to 9 (lowest) (RFC 5545 3.8.1.9).
5
6use crate::{
7    prop::{IcalPropKind, cardinality::IcalPropCardinality, spec::IcalPropSpec},
8    value::IcalValueKind,
9    version::IcalVersion,
10};
11
12/// The `PRIORITY` property marker.
13pub struct PRIORITY;
14
15impl IcalPropSpec for PRIORITY {
16    const KIND: IcalPropKind = IcalPropKind::Priority;
17
18    fn cardinality(_version: IcalVersion) -> IcalPropCardinality {
19        IcalPropCardinality::AtMostOne
20    }
21
22    fn allowed_values(_version: IcalVersion) -> &'static [IcalValueKind] {
23        &[IcalValueKind::Integer]
24    }
25}