#[non_exhaustive]pub enum Disposition {
Erase,
Anonymise(&'static [&'static str]),
Retain(&'static str),
Unreachable(&'static str),
}Expand description
What erasure does to these rows.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Erase
The rows go. The ordinary case.
Anonymise(&'static [&'static str])
The rows stay and the person leaves them: the named columns are overwritten, everything else is untouched.
This exists because Erase breaks aggregates. A commission ledger
cannot lose rows without the totals becoming wrong, and “your deletion
made the accounts disagree” is not a story anybody wants. The columns
named here must be nullable or have a default, which
cratefield-module-privacy checks against the applied schema rather
than trusting.
Retain(&'static str)
The rows stay, whole, and this says why in a sentence a regulator could read.
Retention is sometimes required — tax law outlives an account. Making it a variant that carries a reason means the argument is written next to the table it applies to, in a reviewed diff, rather than being the silence left by a table nobody declared.
Unreachable(&'static str)
The rows hold personal data and erasure cannot reach them, and this says why in a sentence a regulator could read.
This is a third thing, and the reason it exists is that the other two
are both wrong for it: Erase and Anonymise name a subject column
the query builder binds a request value to, and Retain says “the
rows stay on purpose”, which reads as your data, kept deliberately —
not as your data, kept because we have no way to find it. The case
that demanded the variant is a table whose personal data is inside a
value no equality predicate can match — a rendered message filed under
the send, a composite <email>:<product> key — where declaring
PersonalDataSet::none would make a subject-facing manifest report a
table holding the person’s message as not personal data (issue
#274).
Implementations§
Source§impl Disposition
impl Disposition
Sourcepub const fn keeps_row(self) -> bool
pub const fn keeps_row(self) -> bool
Whether erasure leaves the row in place.
Unreachable is included: the row is not deleted, and anything reading
this answer as “the data is gone” is being lied to exactly as hard as
a Retain would lie. The difference is that a Retain row is counted,
exported and described, while an Unreachable row can be none of
those — which is the whole problem.
Trait Implementations§
Source§impl Clone for Disposition
impl Clone for Disposition
Source§fn clone(&self) -> Disposition
fn clone(&self) -> Disposition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Disposition
Source§impl Debug for Disposition
impl Debug for Disposition
impl Eq for Disposition
Source§impl PartialEq for Disposition
impl PartialEq for Disposition
impl StructuralPartialEq for Disposition
Auto Trait Implementations§
impl Freeze for Disposition
impl RefUnwindSafe for Disposition
impl Send for Disposition
impl Sync for Disposition
impl Unpin for Disposition
impl UnsafeUnpin for Disposition
impl UnwindSafe for Disposition
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.