#[non_exhaustive]pub struct DirEntry {
pub name: Vec<u8>,
pub ino: u64,
pub file_type: DirEntryType,
pub deleted: bool,
}Expand description
One decoded directory entry (struct direct).
#[non_exhaustive] so later phases add fields without a breaking change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: Vec<u8>The entry name (d_name), decoded from the d_namlen bytes after the
head. Not NUL-terminated; invalid UTF-8 is preserved as raw bytes.
ino: u64d_ino — the inode number this entry points at. 0 for a free/deleted
slot (only surfaced by list_dir_all).
file_type: DirEntryTypeThe file type from d_type.
deleted: booltrue when this is a free/deleted slot (d_ino == 0) whose residual
name bytes are still readable. Live entries are false.
Trait Implementations§
impl Eq for DirEntry
impl StructuralPartialEq for DirEntry
Auto Trait Implementations§
impl Freeze for DirEntry
impl RefUnwindSafe for DirEntry
impl Send for DirEntry
impl Sync for DirEntry
impl Unpin for DirEntry
impl UnsafeUnpin for DirEntry
impl UnwindSafe for DirEntry
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