pub enum HookFile {
Absent,
Ours,
Foreign(ForeignWhy),
Symlink {
target: Option<PathBuf>,
},
NotARegularFile,
Unknown {
why: String,
},
}Expand description
What is at a hook path, decided once, by classify.
Variants§
Absent
Nothing there. The only state in which writing is unambiguously fine.
Ours
A regular file carrying our marker.
Foreign(ForeignWhy)
Symlink
A symlink, of any kind, pointing anywhere — including at one of our own
shims. target is None when the link itself could not be read.
NotARegularFile
A directory, a fifo, a socket, a device. Not something to write to.
Unknown
symlink_metadata failed with something other than “not found”. We do
not know what is there, which is not the same as nothing being there.
Implementations§
Trait Implementations§
impl Eq for HookFile
impl StructuralPartialEq for HookFile
Auto Trait Implementations§
impl Freeze for HookFile
impl RefUnwindSafe for HookFile
impl Send for HookFile
impl Sync for HookFile
impl Unpin for HookFile
impl UnsafeUnpin for HookFile
impl UnwindSafe for HookFile
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