pub enum DidDeleteEffect {
Cascade,
Blocks,
Revoke,
Unrelated,
}Expand description
What happens to a keyspace’s DID-keyed contents when that DID is deleted.
Deleting a DID is not one cleanup. It is four different relationships, and treating them alike gets one of them wrong in a way nobody notices until it matters:
- things the DID owns go with it;
- things that name it as a subject of authorization must go with it, or they become authority for an identity that no longer resolves;
- things that depend on it to function must stop the deletion, because cascading would silently break them;
- credentials the VTA issued cannot be deleted at all — copies exist elsewhere — so the only honest action is revocation.
§Why this is an enum and not a list in a function
The failure mode is not getting today’s answers wrong. It is a keyspace
added next quarter that nobody classifies, whose rows then quietly outlive
the DID they belong to. ALL is already pinned by a census test for the
backup partition, for exactly the same reason; this rides the same rail, so
“we forgot” is a red test rather than an orphan found months later in a log.
The classifications below are judgements and several are arguable. That is fine — the point of the census is to force the question to be asked, not to claim these answers are the last word.
Variants§
Cascade
Rows belonging to the DID are removed with it.
Blocks
A row referencing the DID blocks the deletion: something still in use would break. Refused, never forced — the operator is told what to unpick first.
Revoke
Rows cannot be removed, because the VTA is not the only holder. They are revoked instead.
Nothing here is keyed to a DID.
Trait Implementations§
Source§impl Clone for DidDeleteEffect
impl Clone for DidDeleteEffect
impl Copy for DidDeleteEffect
Source§impl Debug for DidDeleteEffect
impl Debug for DidDeleteEffect
impl Eq for DidDeleteEffect
Source§impl PartialEq for DidDeleteEffect
impl PartialEq for DidDeleteEffect
impl StructuralPartialEq for DidDeleteEffect
Auto Trait Implementations§
impl Freeze for DidDeleteEffect
impl RefUnwindSafe for DidDeleteEffect
impl Send for DidDeleteEffect
impl Sync for DidDeleteEffect
impl Unpin for DidDeleteEffect
impl UnsafeUnpin for DidDeleteEffect
impl UnwindSafe for DidDeleteEffect
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.