1use crate::{
6 prop::IcalPropKind,
7 tree::{
8 line::IcalLine,
9 prop::{IcalPropLens, IcalPropSpec},
10 value::IcalValueCursor,
11 },
12 value::text::IcalText,
13 version::IcalVersion,
14};
15
16#[allow(non_camel_case_types)]
18pub struct REFID;
19
20impl IcalPropLens for REFID {
21 type Target<'v> = IcalText<'v>;
22
23 type Cursor<'c, 'a>
24 = IcalValueCursor<'c, 'a>
25 where
26 'a: 'c;
27
28 fn cursor<'c, 'a>(line: &'c mut IcalLine<'a>) -> IcalValueCursor<'c, 'a> {
29 IcalValueCursor { line }
30 }
31}
32
33impl IcalPropSpec for REFID {
34 const KIND: IcalPropKind = IcalPropKind::Refid;
35
36 fn allowed_versions() -> &'static [IcalVersion] {
37 &[IcalVersion::V2_0]
38 }
39}