pub struct DirEntry<'a> {
pub parent: &'a Directory,
pub path: OwnedPath<Rel>,
pub file_type_hint: Option<FileType>,
pub inode_num: NonZero<u64>,
}
Available on
Linux
only.Expand description
An entry in a Directory
’s records, taking the form of a reference to the parent Directory
and the relative path to this entry, along with a few other pieces of information.
Among these other pieces of information, is the entry’s inode number and a hint about the
FileType
of the entry. Unfortunately, this field is often not present, and therefore
considered only a hint. If the FileType
is present and has some value, it can be trusted
(subject to TOCTOU restrictions), but the possibility of it not existing should always be
considered or even expected.
Fields§
§parent: &'a Directory
§path: OwnedPath<Rel>
§file_type_hint: Option<FileType>
§inode_num: NonZero<u64>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for DirEntry<'a>
impl<'a> RefUnwindSafe for DirEntry<'a>
impl<'a> Send for DirEntry<'a>
impl<'a> Sync for DirEntry<'a>
impl<'a> Unpin for DirEntry<'a>
impl<'a> UnwindSafe for DirEntry<'a>
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