pub enum FileSizeError {
NotFound {
path: PathBuf,
},
NotAFile {
path: PathBuf,
},
UnableToAccessFile {
file_path: PathBuf,
error: Error,
},
OtherIoError {
error: Error,
},
}Expand description
An error that can occur when querying the size of a file.
Variants§
NotFound
The source file does not exist.
NotAFile
The source path exists, but is not a file nor a symbolic link to one.
UnableToAccessFile
The file cannot be accessed, for example due to missing permissions.
The inner std::io::Error will likely describe the real cause of this error.
Fields
OtherIoError
Uncategorized IO error.
The inner std::io::Error will likely describe the real cause of this error.
Trait Implementations§
Source§impl Debug for FileSizeError
impl Debug for FileSizeError
Source§impl Display for FileSizeError
impl Display for FileSizeError
Source§impl Error for FileSizeError
impl Error for FileSizeError
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 FileSizeError
impl !RefUnwindSafe for FileSizeError
impl Send for FileSizeError
impl Sync for FileSizeError
impl Unpin for FileSizeError
impl !UnwindSafe for FileSizeError
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