pub struct DirectoryEntry {
pub metadata: Metadata,
/* private fields */
}Expand description
A directory entry: either a file or a directory.
Fields§
§metadata: MetadataMetadata for this entry (name, path, cluster, timestamps, etc.).
Implementations§
Source§impl DirectoryEntry
impl DirectoryEntry
Sourcepub fn into_directory(self) -> Option<Directory>
pub fn into_directory(self) -> Option<Directory>
Convert into a Directory, returning None if this is a file.
Sourcepub fn into_directory_unchecked(self) -> Directory
pub fn into_directory_unchecked(self) -> Directory
Convert into a Directory without checking the entry kind.
Sourcepub fn into_directory_or_not_found(self) -> Result<Directory>
pub fn into_directory_or_not_found(self) -> Result<Directory>
Convert into a Directory, returning [VfatRsError::EntryNotFound] if this is a file.
Sourcepub fn into_file(self) -> Option<File>
pub fn into_file(self) -> Option<File>
Convert into a [File], returning None if this is a directory.
Sourcepub fn into_file_unchecked(self) -> File
pub fn into_file_unchecked(self) -> File
Convert into a [File], panicking if this is a directory.
Trait Implementations§
Source§impl Debug for DirectoryEntry
impl Debug for DirectoryEntry
Source§impl From<Directory> for DirectoryEntry
impl From<Directory> for DirectoryEntry
Auto Trait Implementations§
impl Freeze for DirectoryEntry
impl !RefUnwindSafe for DirectoryEntry
impl Send for DirectoryEntry
impl Sync for DirectoryEntry
impl Unpin for DirectoryEntry
impl UnsafeUnpin for DirectoryEntry
impl !UnwindSafe for DirectoryEntry
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