pub enum PathKind {
File,
Directory,
}Expand description
Whether a queried path is a directory — the one fact about a path the matcher cannot
read off its text, and the one trailing-/ patterns (build/) turn on: a directory
pattern matches a directory, never a file of the same name.
Variants§
Implementations§
Source§impl PathKind
impl PathKind
Sourcepub const fn from_is_dir(is_dir: bool) -> Self
pub const fn from_is_dir(is_dir: bool) -> Self
PathKind::Directory when is_dir, else PathKind::File — for a caller
holding the answer as a flag (a directory walk’s entry type, a binding’s argument).
Sourcepub const fn is_dir(self) -> bool
pub const fn is_dir(self) -> bool
Whether this is PathKind::Directory.
Trait Implementations§
impl Copy for PathKind
impl Eq for PathKind
impl StructuralPartialEq for PathKind
Auto Trait Implementations§
impl Freeze for PathKind
impl RefUnwindSafe for PathKind
impl Send for PathKind
impl Sync for PathKind
impl Unpin for PathKind
impl UnsafeUnpin for PathKind
impl UnwindSafe for PathKind
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