pub enum Action {
Create,
Replace,
Delete,
MetadataUpdate,
DerivativeAdd,
DerivativeReplace,
TrashRestore,
}Expand description
The seven authorized lifecycle actions.
Variants§
Create
First write of an asset; prior_provenance_hash is null.
Replace
Replace the original bytes (e.g. re-encryption under a new AMK epoch).
Delete
Soft-delete; the asset enters trash with a retention window.
MetadataUpdate
Edit to the encrypted metadata blob or sidecar fields.
DerivativeAdd
Add a thumbnail, preview, or embedding.
DerivativeReplace
Replace an existing derivative — the only authorized path; silent overwrite rejected.
TrashRestore
Recover a soft-deleted asset from trash within its retention window.
Implementations§
Source§impl Action
impl Action
Sourcepub fn is_create(self) -> bool
pub fn is_create(self) -> bool
Whether this action is the first link in an asset’s chain (prior_provenance_hash
must be null iff this is true).
Sourcepub fn binds_metadata_blob(self) -> bool
pub fn binds_metadata_blob(self) -> bool
Whether this action mints a new encrypted metadata blob and its manifest therefore
commits to metadata_blob_hash: create | replace | metadata-update carry the field,
the other four (delete | derivative-add | derivative-replace | trash-restore) omit it
(SSoT: Provenance — Asset Manifest). The presence-by-action rule is enforced at
structural_ok.
Trait Implementations§
impl Copy for Action
Source§impl<'de> Deserialize<'de> for Action
impl<'de> Deserialize<'de> for Action
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Action
impl StructuralPartialEq for Action
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Action
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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