pub struct DirEntry { /* private fields */ }Implementations§
Source§impl DirEntry
impl DirEntry
Sourcepub fn new(path: PathBuf, name: OsString, file_type: FileType) -> Self
pub fn new(path: PathBuf, name: OsString, file_type: FileType) -> Self
Create a new DirEntry.
This is useful for constructing mock directory entries for testing.
pub fn path(&self) -> PathBuf
pub fn file_name(&self) -> OsString
pub fn file_type(&self) -> Result<FileType>
pub async fn metadata(&self) -> Result<Metadata>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DirEntry
impl RefUnwindSafe for DirEntry
impl Send for DirEntry
impl Sync for DirEntry
impl Unpin 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