pub enum IoError {
FileOpenError {
path: PathBuf,
source: Error,
},
MmapError {
path: PathBuf,
source: Error,
},
EmptyFile {
path: PathBuf,
},
FileTooLarge {
path: PathBuf,
size: u64,
max_size: u64,
},
MetadataError {
path: PathBuf,
source: Error,
},
BufferOverrun {
offset: usize,
length: usize,
buffer_size: usize,
},
InvalidAccess {
offset: usize,
length: usize,
},
InvalidFileType {
path: PathBuf,
file_type: String,
},
}Expand description
Errors that can occur during file I/O operations
Variants§
FileOpenError
File could not be opened for reading
MmapError
File could not be memory-mapped
EmptyFile
File is empty and cannot be processed
FileTooLarge
File is too large to be processed safely
Fields
MetadataError
File metadata could not be read
Fields
BufferOverrun
Buffer access out of bounds
Fields
InvalidAccess
Invalid offset or length parameter
InvalidFileType
File is not a regular file (e.g., device node, FIFO, symlink to special file)
Trait Implementations§
Source§impl Error for IoError
impl Error for IoError
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 IoError
impl !RefUnwindSafe for IoError
impl Send for IoError
impl Sync for IoError
impl Unpin for IoError
impl UnsafeUnpin for IoError
impl !UnwindSafe for IoError
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