pub enum FsError {
PathDoesNotExist(PathBuf),
PathIsNotDirectory(PathBuf),
DirEntry,
DirRead(PathBuf),
FileType(PathBuf),
NonFileNonDir(PathBuf),
}Expand description
Errors that can occur when working with the filesystem module.
Variants§
PathDoesNotExist(PathBuf)
PathIsNotDirectory(PathBuf)
DirEntry
DirRead(PathBuf)
FileType(PathBuf)
NonFileNonDir(PathBuf)
Implementations§
Source§impl FsError
impl FsError
Sourcepub fn path_does_not_exist<P>(path: P) -> Self
pub fn path_does_not_exist<P>(path: P) -> Self
Create a new FsError::PathDoesNotExist
Sourcepub fn path_is_not_directory<P>(path: P) -> Self
pub fn path_is_not_directory<P>(path: P) -> Self
Create a new FsError::PathIsNotDirectory
Sourcepub fn dir_read<P>(path: P) -> Self
pub fn dir_read<P>(path: P) -> Self
Create a new FsError::DirRead
Sourcepub fn file_type<P>(path: P) -> Self
pub fn file_type<P>(path: P) -> Self
Create a new FsError::FileType
Sourcepub fn non_file_non_dir<P>(path: P) -> Self
pub fn non_file_non_dir<P>(path: P) -> Self
Create a new FsError::NonFileNonDir
Trait Implementations§
impl Eq for FsError
Source§impl Error for FsError
impl Error for FsError
1.30.0 · 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()
impl StructuralPartialEq for FsError
Auto Trait Implementations§
impl Freeze for FsError
impl RefUnwindSafe for FsError
impl Send for FsError
impl Sync for FsError
impl Unpin for FsError
impl UnsafeUnpin for FsError
impl UnwindSafe for FsError
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
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>
Converts
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>
Converts
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