pub struct PersonalDataCatalog { /* private fields */ }Expand description
Every personal-data declaration in a composition, with the module that made it.
Composed once at HarnessBuilder::build and handed to every module through
ModuleContext, the same way the UI surface is.
cratefield-module-privacy reads it to export, to erase, and to publish the
table; nothing else needs it, but nothing else is harmed by having it, and a
port just for this would be a capability the runtime has to provide for a
list the harness already holds.
Implementations§
Source§impl PersonalDataCatalog
impl PersonalDataCatalog
Sourcepub fn compose<'a>(
modules: impl IntoIterator<Item = (&'static str, &'a [PersonalDataSet])>,
) -> Self
pub fn compose<'a>( modules: impl IntoIterator<Item = (&'static str, &'a [PersonalDataSet])>, ) -> Self
Collects declarations in composition order.
Tables declared as holding nothing personal are kept rather than
filtered: the published table is more honest for saying pose_library:
reference poses, identical for every member than for omitting it, and a
reader cannot tell an omission from an oversight.
Sourcepub fn entries(&self) -> &[CatalogEntry]
pub fn entries(&self) -> &[CatalogEntry]
Every declaration, composition order.
Sourcepub fn subject_sets(&self) -> impl Iterator<Item = &CatalogEntry>
pub fn subject_sets(&self) -> impl Iterator<Item = &CatalogEntry>
The declarations that actually hold data about somebody: what export reads and erasure acts on.
Unreachable declarations are skipped too. They hold personal data, but
there is no subject column to bind a request value to, so there is no
predicate to build — which is the point of the variant. They are not
forgotten: is_empty counts them, and the manifest
publishes them in their own bucket, because “cannot reach” and “holds
nobody” must never look the same to a subject.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether anything in this composition holds personal data at all.
A venture where this is false has an honest empty export, and its privacy page can say so. It is also the signal that a venture composed the privacy module and forgot that its own modules declare nothing — an export that succeeds and returns nothing is the failure this distinguishes.
Unreachable declarations count as holding. An export over a table
erasure cannot reach is empty, yes — but “we hold nothing about you”
over a table that holds the person’s message is precisely the
mis-answer issue #274 is about, and subject_sets alone would
produce it.
Trait Implementations§
Source§impl Clone for PersonalDataCatalog
impl Clone for PersonalDataCatalog
Source§fn clone(&self) -> PersonalDataCatalog
fn clone(&self) -> PersonalDataCatalog
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more