#[non_exhaustive]pub enum NodeKind {
Dir,
RegularFile,
NotFollowable {
tag: Option<u32>,
},
NotAFile,
}Expand description
What a child is, decided without following it.
#[non_exhaustive], and every reader must match with a catch-all arm that
refuses. A variant added later for diagnostics has to fail closed on
every existing reader rather than fall into an is_dir()-shaped assumption.
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.
Dir
RegularFile
NotFollowable
Symlink, NTFS junction, app-exec-link, WCI layer, OneDrive placeholder, or any other reparse tag.
One variant on purpose. The Windows trap is that a junction reports
is_symlink() == false and is_dir() == true, so any type that lets a
caller tell “symlink” from “some other reparse point” invites the wrong
branch. There is no branch here to get wrong.
NotAFile
FIFO, socket, device, NUL, a named pipe — anything a read would block
on, or that is not a file at all.
Trait Implementations§
impl Copy for NodeKind
impl Eq for NodeKind
impl StructuralPartialEq for NodeKind
Auto Trait Implementations§
impl Freeze for NodeKind
impl RefUnwindSafe for NodeKind
impl Send for NodeKind
impl Sync for NodeKind
impl Unpin for NodeKind
impl UnsafeUnpin for NodeKind
impl UnwindSafe for NodeKind
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