pub enum Adoption {
Adopted,
Advanced,
AlreadyHeld,
MissingHistory,
NeedsOriginal,
Diverged,
}Expand description
What adopting one applied entry did to the assets this workspace holds
(Workspace::adopt_remote_head, Workspace::adopt_remote_original).
Adoption never decides whether an entry is true; the chokepoint did. It decides only
whether the verified record can become part of a chain this workspace holds without
breaking that chain’s rules: a chain starts at its create
([ProvenanceChain::append]), and each later record names the head before it.
Variants§
Adopted
A create of an asset this workspace did not hold. Its record, sidecar, sealed metadata
blob and original are written under media/, its row and user tags indexed, and the
asset is held: the trash verbs, tag edits and uploads work on it, and its next signed
record chains onto the create.
Advanced
A record of a held asset that chains onto its head. It is appended; the sidecar and sealed metadata blob follow it when it binds one, the original when it replaces it, and the index row is rewritten.
AlreadyHeld
The held chain already contains this record. Nothing was written.
MissingHistory
An asset this workspace does not hold, whose record is not its create. A chain cannot
start anywhere but at its create, and the feed carries only an asset’s latest record, so
the asset stays unheld until its earlier records are fetched and handed to
Workspace::adopt_remote_history. Nothing was written.
NeedsOriginal
A record that needs the plaintext original — the create of an unheld asset, or one
that replaces a held original — applied without it. Nothing was written; adopt it
through Workspace::adopt_remote_original.
Diverged
A record of a held asset that does not chain onto its head: a fork, or a gap of records this workspace has not seen. Nothing was written; the held chain stands.
Implementations§
Trait Implementations§
impl Copy for Adoption
impl Eq for Adoption
impl StructuralPartialEq for Adoption
Auto Trait Implementations§
impl Freeze for Adoption
impl RefUnwindSafe for Adoption
impl Send for Adoption
impl Sync for Adoption
impl Unpin for Adoption
impl UnsafeUnpin for Adoption
impl UnwindSafe for Adoption
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more