pub enum Ext4Error {
NotAbsolute,
NotASymlink,
NotFound,
IsADirectory,
NotADirectory,
IsASpecialFile,
FileTooLarge,
NotUtf8,
MalformedPath,
Io(Box<dyn IoError>),
Incompatible(Incompatible),
Corrupt(Corrupt),
}Expand description
Common error type for all Ext4 operations.
Variants§
NotAbsolute
An operation that requires an absolute path was attempted on a relative path.
NotASymlink
An operation that requires a symlink was attempted on a non-symlink file.
NotFound
A path points to a non-existent file.
IsADirectory
An operation that requires a non-directory path was attempted on a directory path.
NotADirectory
An operation that requires a directory path was attempted on a non-directory path.
IsASpecialFile
An operation that requires a regular file (or a symlink to a regular file) was attempted on a special file (fifo, character device, block device, or socket).
FileTooLarge
The file cannot be read into memory because it is too large.
NotUtf8
Data is not valid UTF-8.
MalformedPath
Data cannot be converted into a valid path.
Io(Box<dyn IoError>)
An IO operation failed. This error comes from the Ext4Read
passed to Ext4::load.
Incompatible(Incompatible)
The filesystem is not supported by this library. This does not indicate a problem with the filesystem, or with the calling code. Please file a feature request and include the incompatible features.
Corrupt(Corrupt)
The filesystem is corrupt in some way.
Implementations§
source§impl Ext4Error
impl Ext4Error
sourcepub fn as_corrupt(&self) -> Option<&Corrupt>
pub fn as_corrupt(&self) -> Option<&Corrupt>
If the error type is Ext4Error::Corrupt, get the underlying error.
sourcepub fn as_incompatible(&self) -> Option<&Incompatible>
pub fn as_incompatible(&self) -> Option<&Incompatible>
If the error type is Ext4Error::Incompatible, get the underlying error.
sourcepub fn as_io(&self) -> Option<&dyn IoError>
pub fn as_io(&self) -> Option<&dyn IoError>
If the error type is Ext4Error::Io, get the underlying error.