dpp_domain/personal_data/statement.rs
1//! [`PersonalDataStatement`] — the operator's statement about one marked field.
2
3use serde::{Deserialize, Serialize};
4
5use super::held_outside::HeldOutside;
6
7/// What the operator states about personal data for one field its schema marks
8/// as able to hold it.
9///
10/// Both forms make the same assertion about the field's value: it carries no
11/// personal data beyond what the governing act requires the passport itself to
12/// carry. They differ only in where related personal data is held. See the
13/// module documentation for why that is never inside the passport.
14///
15/// On the wire, keyed by the field's dotted path in the passport's
16/// `personalData` map:
17///
18/// ```json
19/// { "usageHistory.negativeEvents": { "held": "nothing" } }
20/// { "usageHistory.negativeEvents": { "held": "outside", "lawfulBasis": "consent", "record": "…" } }
21/// ```
22#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
23#[serde(tag = "held")]
24#[non_exhaustive]
25pub enum PersonalDataStatement {
26 /// No personal data related to this field of this passport is held.
27 #[serde(rename = "nothing")]
28 NothingHeld,
29 /// Personal data related to this field is held outside the passport, in an
30 /// erasable record.
31 #[serde(rename = "outside")]
32 HeldOutside(HeldOutside),
33}