pub struct DirEntry { /* private fields */ }Expand description
One native directory entry with its already-fetched metadata.
Implementations§
Source§impl DirEntry
impl DirEntry
pub fn new(path: PathBuf, metadata: Attrs) -> DirEntry
pub fn path(&self) -> &Path
Sourcepub fn into_parts(self) -> (PathBuf, Attrs)
pub fn into_parts(self) -> (PathBuf, Attrs)
Consume the entry, transferring its owned path and metadata without cloning.
pub fn file_name(&self) -> Option<&OsStr>
pub fn file_type(&self) -> VfType
pub fn attrs(&self) -> &Attrs
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