1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! Raw property and component preservation types for ADR-001 round-trip.
//!
//! `RawProperty` stores prefix-unmatched `X-*` properties (and, after later
//! migration steps, vendor-prefix-matched but not-yet-typed properties).
//! Values are kept verbatim — no escape decoding — because we don't know
//! what value type rules apply to an unknown property.
//!
//! `source_index` is the monotonic input order; ADR-018 specifies that
//! the formatter emits `unknown` properties at the end of their component,
//! sorted by `source_index`, so the round-trip preserves the relative
//! ordering of unknowns even if their absolute position drifts past the
//! canonical-order typed fields.
use Serialize;
/// A component (`BEGIN:NAME ... END:NAME`) that the typed model does not
/// understand, preserved verbatim for ADR-001 / ADR-018 round-trip.
///
/// Examples: `VTIMEZONE` at the calendar level, `VALARM` nested inside a
/// `VEVENT`. Nested unknown components are stored recursively in
/// `sub_components`.