#[non_exhaustive]pub enum PlannedChange {
CreateFile {
path: PathBuf,
},
PatchFile {
path: PathBuf,
},
RemoveFile {
path: PathBuf,
},
RestoreBackup {
backup: PathBuf,
target: PathBuf,
},
CreateBackup {
backup: PathBuf,
target: PathBuf,
},
CreateDir {
path: PathBuf,
},
RemoveDir {
path: PathBuf,
},
WriteLedger {
path: PathBuf,
key: String,
owner: String,
},
RemoveLedgerEntry {
path: PathBuf,
key: String,
},
SetPermissions {
path: PathBuf,
mode: u32,
},
NoOp {
path: PathBuf,
reason: String,
},
Refuse {
path: Option<PathBuf>,
reason: RefusalReason,
},
}Expand description
One concrete change in a dry-run plan.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CreateFile
Create a file.
PatchFile
Patch an existing file in place.
RemoveFile
Remove a file.
RestoreBackup
Restore a backup file over its original target.
CreateBackup
Create a backup file before patching a target.
CreateDir
Create a directory.
RemoveDir
Remove a directory.
WriteLedger
Write or update an ownership ledger entry.
RemoveLedgerEntry
Remove an ownership ledger entry.
SetPermissions
Set file permissions.
NoOp
No filesystem or ledger change is needed for this path.
Refuse
Refuse the operation before mutation.
Fields
§
reason: RefusalReasonRefusal reason.
Trait Implementations§
Source§impl Clone for PlannedChange
impl Clone for PlannedChange
Source§fn clone(&self) -> PlannedChange
fn clone(&self) -> PlannedChange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlannedChange
impl Debug for PlannedChange
impl Eq for PlannedChange
Source§impl PartialEq for PlannedChange
impl PartialEq for PlannedChange
Source§fn eq(&self, other: &PlannedChange) -> bool
fn eq(&self, other: &PlannedChange) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PlannedChange
Auto Trait Implementations§
impl Freeze for PlannedChange
impl RefUnwindSafe for PlannedChange
impl Send for PlannedChange
impl Sync for PlannedChange
impl Unpin for PlannedChange
impl UnsafeUnpin for PlannedChange
impl UnwindSafe for PlannedChange
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
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§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
Compare self to
key and return true if they are equal.