pub enum DirectoryEmptinessScanError {
NotFound {
path: PathBuf,
},
NotADirectory {
path: PathBuf,
},
UnableToReadDirectory {
directory_path: PathBuf,
error: Error,
},
UnableToReadDirectoryEntry {
directory_path: PathBuf,
error: Error,
},
}Expand description
An error that can occur when checking whether a directory is empty
(see is_directory_empty).
Variants§
NotFound
The provided directory path to scan doesn’t exist.
NotADirectory
The provided directory path exists, but is not a directory.
UnableToReadDirectory
The provided directory path is a directory, but could not be read due to an IO error.
The inner std::io::Error will likely describe a more precise cause of this error.
Fields
UnableToReadDirectoryEntry
A directory contains an entry (i.e. directory or file) that could not be read due to an IO error.
The inner std::io::Error will likely describe a more precise cause of this error.
Trait Implementations§
Source§impl Debug for DirectoryEmptinessScanError
impl Debug for DirectoryEmptinessScanError
Source§impl Error for DirectoryEmptinessScanError
impl Error for DirectoryEmptinessScanError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for DirectoryEmptinessScanError
impl !RefUnwindSafe for DirectoryEmptinessScanError
impl Send for DirectoryEmptinessScanError
impl Sync for DirectoryEmptinessScanError
impl Unpin for DirectoryEmptinessScanError
impl !UnwindSafe for DirectoryEmptinessScanError
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