pub enum Operation {
CreateDataLink {
pack: String,
handler: String,
source: PathBuf,
},
CreateUserLink {
pack: String,
handler: String,
datastore_path: PathBuf,
user_path: PathBuf,
},
RunCommand {
pack: String,
handler: String,
executable: String,
arguments: Vec<String>,
sentinel: String,
},
CheckSentinel {
pack: String,
handler: String,
sentinel: String,
},
}Expand description
The four atomic operations dodot performs.
Uses enum variants with associated data so that each variant carries exactly the fields it needs — impossible states are unrepresentable.
Variants§
CreateDataLink
Link a source file into the datastore.
handler_data_dir(pack, handler) / filename -> source
CreateUserLink
Create a user-visible symlink.
user_path -> datastore_path
RunCommand
Execute a command and record a sentinel on success.
CheckSentinel
Check whether a sentinel exists (query, not mutation).
Implementations§
Trait Implementations§
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
Mutably borrows from an owned value. Read more