pub struct DirListing {
pub entries: Vec<FileInfo>,
pub errors: Vec<Report>,
}Expand description
The contents of a directory, together with any per-entry failures.
Reading a directory is not all-or-nothing. A hidden sibling is silently unreclaimed disk space, so one bad entry must not discard the rest of the listing.
Two different things could discard it, and they are handled differently. A name that
does not decode as UTF-8 is not an error at all – see FileInfo::name, which keeps
the decoded form for matching and the original std::path::PathBuf for every
filesystem operation. errors covers the remaining case: an entry whose type cannot be
determined, which is rare and genuinely unusable.
Fields§
§entries: Vec<FileInfo>§errors: Vec<Report>Trait Implementations§
Source§impl Debug for DirListing
impl Debug for DirListing
Source§impl Default for DirListing
impl Default for DirListing
Source§fn default() -> DirListing
fn default() -> DirListing
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for DirListing
impl !UnwindSafe for DirListing
impl Freeze for DirListing
impl Send for DirListing
impl Sync for DirListing
impl Unpin for DirListing
impl UnsafeUnpin for DirListing
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