pub enum Operation {
WriteFile {
path: TargetPath,
class: Class,
before: Option<Sha256>,
after: Sha256,
},
KeepFile {
path: TargetPath,
held: Sha256,
baseline_before: Sha256,
baseline_after: Sha256,
},
SpliceBlock {
path: TargetPath,
marker: String,
before: Option<Sha256>,
after: Sha256,
},
RemoveOwnedFile {
path: TargetPath,
before: Sha256,
},
WriteDebt {
path: TargetPath,
before: Option<Sha256>,
after: Sha256,
},
WriteRecord {
path: TargetPath,
before: Option<Sha256>,
after: Sha256,
},
}Expand description
One typed write a plan will make.
Variants§
WriteFile
Put the release’s bytes at a destination.
Fields
path: TargetPathWhere.
KeepFile
Keep the target’s own bytes and move the baseline they are read against.
This is what an adopted file is: seeded once, then the project’s. An upgrade moves the baseline so the next verification compares the project’s copy against what the new release would have seeded.
Fields
path: TargetPathWhere.
SpliceBlock
Replace one marked region inside a file the project owns.
Fields
path: TargetPathWhere.
RemoveOwnedFile
Take back a file the release no longer owns.
And the directory that removal empties, where the directory is one the canon owns and is not itself an owned root. A skill is a directory holding one file, and an empty directory carrying a retired skill’s name is one some agents still list. The directory is part of what this operation names rather than a second mutation beside it, because a file’s removal is the only thing that can empty it.
WriteDebt
Write the inherited violations the operator asked to record.
Fields
path: TargetPathWhere.
WriteRecord
Write the instance record itself, last.
Implementations§
Source§impl Operation
impl Operation
Sourcepub const fn path(&self) -> &TargetPath
pub const fn path(&self) -> &TargetPath
Where this operation writes.
Sourcepub const fn kind(&self) -> &'static str
pub const fn kind(&self) -> &'static str
The kebab-case kind, as the fingerprint and the JSON spell it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Operation
impl<'de> Deserialize<'de> for Operation
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 Operation
impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnsafeUnpin for Operation
impl UnwindSafe for Operation
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.