pub enum PathError {
Show 13 variants
DoesNotExist(PathBuf),
Empty,
ExistsAlready(PathBuf),
ExtensionNotFound(PathBuf),
FailedToString(PathBuf),
FileNameNotFound(PathBuf),
InvalidExpansion(PathBuf),
IsNotDir(PathBuf),
IsNotExec(PathBuf),
IsNotFile(PathBuf),
IsNotFileOrSymlinkToFile(PathBuf),
MultipleHomeSymbols(PathBuf),
ParentNotFound(PathBuf),
}Variants§
DoesNotExist(PathBuf)
An error indicating that the path does not exist.
Empty
An error indicating that the path is empty.
ExistsAlready(PathBuf)
An error indicating that the path exists already.
ExtensionNotFound(PathBuf)
An error indicating that the path does not have an extension.
FailedToString(PathBuf)
An error indicating a failure to convert the path to a string.
FileNameNotFound(PathBuf)
An error indicating that the path does not contain a filename.
InvalidExpansion(PathBuf)
An error indicating that the path failed to expand properly.
IsNotDir(PathBuf)
An error indicating that the path is not a directory.
IsNotExec(PathBuf)
An error indicating that the path is not an executable file.
IsNotFile(PathBuf)
An error indicating that the path is not a file.
IsNotFileOrSymlinkToFile(PathBuf)
An error indicating that the path is not a file or symlink to a file.
MultipleHomeSymbols(PathBuf)
An error indicating that the path contains multiple user home symbols i.e. tilda.
ParentNotFound(PathBuf)
An error indicating that the path does not have a valid parent path.
Implementations§
Source§impl PathError
impl PathError
Sourcepub fn does_not_exist<T>(path: T) -> PathError
pub fn does_not_exist<T>(path: T) -> PathError
Return an error indicating that the path does not exist
Sourcepub fn exists_already<T>(path: T) -> PathError
pub fn exists_already<T>(path: T) -> PathError
Return an error indicating that the path exists already
Sourcepub fn extension_not_found<T>(path: T) -> PathError
pub fn extension_not_found<T>(path: T) -> PathError
Return an error indicating that the path extension was not found
Sourcepub fn failed_to_string<T>(path: T) -> PathError
pub fn failed_to_string<T>(path: T) -> PathError
Return an error indicating a failure to convert the path to a string
Sourcepub fn filename_not_found<T>(path: T) -> PathError
pub fn filename_not_found<T>(path: T) -> PathError
Return an error indicating that the path does not contain a filename
Sourcepub fn is_not_dir<T>(path: T) -> PathError
pub fn is_not_dir<T>(path: T) -> PathError
Return an error indicating that the path is not a directory
Sourcepub fn is_not_exec<T>(path: T) -> PathError
pub fn is_not_exec<T>(path: T) -> PathError
Return an error indicating that the path is not an executable
Sourcepub fn is_not_file<T>(path: T) -> PathError
pub fn is_not_file<T>(path: T) -> PathError
Return an error indicating that the path is not a file
Sourcepub fn is_not_file_or_symlink_to_file<T>(path: T) -> PathError
pub fn is_not_file_or_symlink_to_file<T>(path: T) -> PathError
Return an error indicating that the path is not a file or symlink to file
Sourcepub fn invalid_expansion<T>(path: T) -> PathError
pub fn invalid_expansion<T>(path: T) -> PathError
Return an error indicating that the path failed to expand properly
Sourcepub fn multiple_home_symbols<T>(path: T) -> PathError
pub fn multiple_home_symbols<T>(path: T) -> PathError
Return an error indicating that the path contains multiple user home symbols i.e. tilda
Sourcepub fn parent_not_found<T>(path: T) -> PathError
pub fn parent_not_found<T>(path: T) -> PathError
Return an error indicating that the path does not have a valid parent path
Trait Implementations§
Source§impl Error for PathError
impl Error for PathError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl Ord for PathError
impl Ord for PathError
Source§impl PartialOrd for PathError
impl PartialOrd for PathError
impl Eq for PathError
impl StructuralPartialEq for PathError
Auto Trait Implementations§
impl Freeze for PathError
impl RefUnwindSafe for PathError
impl Send for PathError
impl Sync for PathError
impl Unpin for PathError
impl UnsafeUnpin for PathError
impl UnwindSafe for PathError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.