pub struct DiskEntry {
pub path: PathBuf,
pub name: Option<String>,
pub children: Option<Vec<DiskEntry>>,
}
Expand description
The result of the read_dir
function.
A DiskEntry is either a file or a directory.
The children
Vec is always Some
if the entry is a directory.
Fields§
§path: PathBuf
The path to this entry.
name: Option<String>
The name of this entry (file name with extension or directory name)
children: Option<Vec<DiskEntry>>
The children of this entry if it’s a directory.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DiskEntry
impl RefUnwindSafe for DiskEntry
impl Send for DiskEntry
impl Sync for DiskEntry
impl Unpin for DiskEntry
impl UnwindSafe for DiskEntry
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more