pub struct WalkEntry { /* private fields */ }Expand description
One entry yielded by a Walk: a path plus the file type the directory
listing reported for it.
The file type is the one from fs::DirEntry::file_type, which does
not follow symlinks — a symlink is neither is_dir
nor is_file, so a symlinked directory is yielded as a
plain entry and never descended into. That bounds the walk: a symlink
cycle cannot make it run forever (CLAUDE.md’s guard-against-unbounded-
growth rule).
Implementations§
Source§impl WalkEntry
impl WalkEntry
Sourcepub fn path(&self) -> &Path
pub fn path(&self) -> &Path
The entry’s full path — the walk’s root joined with everything descended through to reach it.
Sourcepub fn into_path(self) -> PathBuf
pub fn into_path(self) -> PathBuf
Consume the entry for its path, avoiding a clone when the path is all the caller wanted.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WalkEntry
impl RefUnwindSafe for WalkEntry
impl Send for WalkEntry
impl Sync for WalkEntry
impl Unpin for WalkEntry
impl UnsafeUnpin for WalkEntry
impl UnwindSafe for WalkEntry
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