ical/prop/resources.rs
1//! # RESOURCES
2//!
3//! The `RESOURCES` property: the resources the component needs (RFC 5545
4//! 3.8.1.10).
5
6use crate::{
7 prop::{IcalPropKind, spec::IcalPropSpec},
8 value::IcalValueKind,
9 version::IcalVersion,
10};
11
12/// The `RESOURCES` property marker.
13pub struct RESOURCES;
14
15impl IcalPropSpec for RESOURCES {
16 const KIND: IcalPropKind = IcalPropKind::Resources;
17
18 fn allowed_values(_version: IcalVersion) -> &'static [IcalValueKind] {
19 &[IcalValueKind::TextList]
20 }
21
22 /// A list whatever `VALUE` declares: `TEXT` describes each item, not the
23 /// value as a whole.
24 fn value(_version: IcalVersion, _declared: Option<IcalValueKind>) -> IcalValueKind {
25 IcalValueKind::TextList
26 }
27}