pub enum FatError {
Show 20 variants
InvalidBootSignature {
found: u16,
},
UnsupportedFatType(&'static str),
InvalidFsInfoSignature {
field: &'static str,
expected: u32,
found: u32,
},
InvalidShortFilename,
ClusterOutOfBounds {
cluster: u32,
max: u32,
},
BadCluster {
cluster: u32,
},
UnexpectedEndOfChain {
cluster: u32,
},
Io(Error),
NotAFile,
NotADirectory,
EntryNotFound,
InvalidPath,
NoFreeSpace,
DirectoryFull,
InvalidFilename,
AlreadyExists,
DirectoryNotEmpty,
VolumeTooSmall {
size: u64,
min_size: u64,
},
VolumeTooLarge {
size: u64,
max_size: u64,
},
InvalidFormatOption {
option: &'static str,
reason: &'static str,
},
}Expand description
Errors that can occur when working with FAT file systems.
Variants§
InvalidBootSignature
Invalid boot signature (expected 0xAA55)
UnsupportedFatType(&'static str)
Unsupported FAT type (FAT12/16 when FAT32 expected, or vice versa)
InvalidFsInfoSignature
Invalid FSInfo signature
Fields
InvalidShortFilename
Invalid short filename (contains disallowed characters)
ClusterOutOfBounds
Cluster number out of bounds
BadCluster
Bad cluster marker encountered
UnexpectedEndOfChain
End of cluster chain reached unexpectedly
Io(Error)
I/O error from the underlying storage
NotAFile
File is not a regular file (e.g., is a directory)
NotADirectory
Entry is not a directory
EntryNotFound
Entry not found in directory
InvalidPath
Path is invalid (empty, malformed)
NoFreeSpace
No free clusters available
DirectoryFull
Directory is full (no free entry slots)
InvalidFilename
Filename is invalid or too long
AlreadyExists
Entry with this name already exists
DirectoryNotEmpty
Cannot delete non-empty directory
VolumeTooSmall
Volume is too small for the requested format
VolumeTooLarge
Volume is too large for the requested FAT type
InvalidFormatOption
Invalid format option
Trait Implementations§
Source§impl Error for FatError
Available on crate feature std only.
impl Error for FatError
std only.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()