pub enum DirectoryScanError {
NotFound {
path: PathBuf,
},
NotADirectory {
path: PathBuf,
},
UnableToReadDirectory {
directory_path: PathBuf,
error: Error,
},
UnableToReadDirectoryEntry {
directory_path: PathBuf,
error: Error,
},
SymlinkCycleEncountered {
directory_path: PathBuf,
},
}Expand description
An error that can occur when scanning a directory.
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.
Fields
SymlinkCycleEncountered
A symlink inside the scan tree is cyclical.
Trait Implementations§
Source§impl Debug for DirectoryScanError
impl Debug for DirectoryScanError
Source§impl Display for DirectoryScanError
impl Display for DirectoryScanError
Source§impl Error for DirectoryScanError
impl Error for DirectoryScanError
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()
Source§impl From<DirectoryScanError> for MoveDirectoryPreparationError
impl From<DirectoryScanError> for MoveDirectoryPreparationError
Source§fn from(source: DirectoryScanError) -> Self
fn from(source: DirectoryScanError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DirectoryScanError
impl !RefUnwindSafe for DirectoryScanError
impl Send for DirectoryScanError
impl Sync for DirectoryScanError
impl Unpin for DirectoryScanError
impl !UnwindSafe for DirectoryScanError
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