#[non_exhaustive]pub enum PathTag {
Input,
InPathEnv(usize),
SymlinkTo(PathBuf),
Shim,
SameCanonical,
SameContent,
Relative,
NonNormalized,
DifferentBinary,
ManagedBy(String),
BuildOutput,
Ephemeral,
}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.
Input
The path that was passed as input
InPathEnv(usize)
Found in PATH environment variable (holds discovery order: 0 = first PATH match)
SymlinkTo(PathBuf)
Is a symlink, pointing to the given target
Shim
In a shim directory or symlink target name doesn’t match candidate name
SameCanonical
Canonical path matches the input binary (same file)
SameContent
File content matches the input binary byte-for-byte (copied identical binary)
Relative
Relative path (doesn’t start with /)
NonNormalized
Non-normalized path (contains .. or . components)
DifferentBinary
Same name but different binary (canonical and content both differ)
ManagedBy(String)
Under a version manager (holds manager name)
BuildOutput
Inside a build output directory
Ephemeral
Inside a temporary/cache directory
Trait Implementations§
impl Eq for PathTag
impl StructuralPartialEq for PathTag
Auto Trait Implementations§
impl Freeze for PathTag
impl RefUnwindSafe for PathTag
impl Send for PathTag
impl Sync for PathTag
impl Unpin for PathTag
impl UnsafeUnpin for PathTag
impl UnwindSafe for PathTag
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