#[non_exhaustive]pub enum UnsafeModificationReason {
NoVcs,
Dirty {
worktree: PathBuf,
dirty_files: Vec<PathBuf>,
staged_files: Vec<PathBuf>,
},
Staged {
worktree: PathBuf,
staged_files: Vec<PathBuf>,
},
}Expand description
The reason modification of the queried target is considered unsafe under
the current --allow-* policy.
This type explains why ModificationSafety::Unsafe was returned.
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.
NoVcs
Modification is considered unsafe because no supported VCS repository was found for the queried target.
Dirty
Modification is considered unsafe because dirty files were found.
staged_files is non-empty only when staged changes also make the
modification unsafe.
Fields
Staged
Modification is considered unsafe because staged changes were found.
Trait Implementations§
Source§impl Debug for UnsafeModificationReason
impl Debug for UnsafeModificationReason
Source§impl From<UnsafeModificationReason> for ModificationSafety
impl From<UnsafeModificationReason> for ModificationSafety
Source§fn from(reason: UnsafeModificationReason) -> Self
fn from(reason: UnsafeModificationReason) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UnsafeModificationReason
impl RefUnwindSafe for UnsafeModificationReason
impl Send for UnsafeModificationReason
impl Sync for UnsafeModificationReason
impl Unpin for UnsafeModificationReason
impl UnsafeUnpin for UnsafeModificationReason
impl UnwindSafe for UnsafeModificationReason
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