#[non_exhaustive]pub enum Audience {
Public,
LegitimateInterest,
Authority,
}Expand description
Re-export the canonical access vocabulary from dpp-domain. Who is asking for passport data.
Regulation (EU) 2023/1542 Art. 77(2) names three audiences and assigns each a set of Annex XIII data points:
| Audience | Annex XIII |
|---|---|
| (a) general public | 1 |
| (b) notified bodies, market surveillance authorities, the Commission | 2 and 3 |
| (c) persons with a legitimate interest | 2 and 4 |
This is a lattice, not a ranking. Point 3 (conformity test reports) is
authority-only; point 4 (individual-item use history) is
legitimate-interest-only. Neither audience contains the other, so no integer
ordering can express the assignment: any >= comparison necessarily either
hands authorities the individual-item data Art. 77(2)(b) withholds, or hides
point-2 data from someone entitled to it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Public
Anyone, with no credential. Art. 77(2)(a).
LegitimateInterest
A repairer, remanufacturer, second-life operator or recycler holding a credential that proves the interest. Art. 77(2)(c).
Authority
Notified body, market surveillance authority, customs, or the Commission. Art. 77(2)(b).
Implementations§
Source§impl Audience
impl Audience
Sourcepub fn disclosure_set(self) -> Vec<Disclosure>
pub fn disclosure_set(self) -> Vec<Disclosure>
The disclosure classes this audience may see, in Annex XIII order.
Sourcepub fn disclosure_key(self) -> String
pub fn disclosure_key(self) -> String
The disclosure_key for this audience’s classes — the name under which
a view served to it is signed and audited.
Two audiences with the same class set would share a key, and that is correct: the artefact describes the data it covers, not who asked.
Sourcepub const fn may_see(self, disclosure: Disclosure) -> bool
pub const fn may_see(self, disclosure: Disclosure) -> bool
Whether this audience may see a field of class disclosure.
The whole Art. 77(2) assignment, in one table.
Trait Implementations§
impl Copy for Audience
Source§impl<'de> Deserialize<'de> for Audience
impl<'de> Deserialize<'de> for Audience
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Audience, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Audience, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Audience
Source§impl Serialize for Audience
impl Serialize for Audience
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Audience
Auto Trait Implementations§
impl Freeze for Audience
impl RefUnwindSafe for Audience
impl Send for Audience
impl Sync for Audience
impl Unpin for Audience
impl UnsafeUnpin for Audience
impl UnwindSafe for Audience
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.