pub struct DirEntry {
pub path: Path,
pub name: String,
pub kind: FileKind,
pub metadata: Option<FileMetadata>,
}Expand description
One entry returned by directory listing.
§Examples
use qubit_fs::metadata::{DirEntry, FileKind};
use qubit_fs::path::Path;
let entry = DirEntry::new(Path::parse("/a")?, FileKind::File);
assert_eq!("/a", entry.path.as_str());Fields§
§path: PathProvider-local path of the entry.
name: StringFinal path component.
kind: FileKindProvider-neutral resource kind.
metadata: Option<FileMetadata>Optional metadata loaded with the entry.
Implementations§
Trait Implementations§
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