pub struct WalkError {
pub path: Option<PathBuf>,
pub message: String,
pub forbidden: bool,
}Expand description
Something the walk could not read. Collected rather than fatal: one unreadable directory must not cost the user the rest of the scan.
Fields§
§path: Option<PathBuf>The path involved, when the error names one.
message: StringWhat went wrong.
forbidden: boolWhether the operating system refused, rather than something having gone wrong.
Recorded from the io::Error’s kind at the moment it is caught, never by reading the
message afterwards — this crate has already been bitten once by parsing a program’s
prose, and an errno does not get translated.
The two are worth telling apart because only one of them is news. A macOS home directory
holds a dozen paths under Library that TCC refuses every process without Full Disk
Access, and they will read the same on every run forever; printing them beside a genuine
failure, every time, is how a reader learns to skip the line that says the totals are a
floor.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WalkError
impl RefUnwindSafe for WalkError
impl Send for WalkError
impl Sync for WalkError
impl Unpin for WalkError
impl UnsafeUnpin for WalkError
impl UnwindSafe for WalkError
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
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> ⓘ
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> ⓘ
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