#[non_exhaustive]pub enum Error<E> {
Show 21 variants
Device(E),
BadBootSector,
BadGeometry,
NoPartition,
NotFat32,
NotExFat,
Unsupported,
FilesystemNotEnabled,
InvalidCluster,
NotFound,
NotAFile,
NotADirectory,
InvalidName,
NameTooLong,
TruncatedFile,
InvalidPosition,
NoSpace,
AlreadyExists,
NotEmpty,
FileTooLarge,
InvalidOperation,
}Expand description
What can go wrong mounting a volume or reading from it. E is the block device’s own error.
New variants may be added in a minor release.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Device(E)
The block device failed.
BadBootSector
The boot sector is not valid (and neither is its backup).
BadGeometry
The boot sector describes a layout that does not fit the device or is inconsistent.
NoPartition
There is no filesystem at block 0 and no usable partition table.
NotFat32
The volume was expected to be FAT32 and is not.
NotExFat
The volume was expected to be exFAT and is not.
Unsupported
A valid filesystem this crate does not support (FAT12 or FAT16, TexFAT, a sector size other than 512).
FilesystemNotEnabled
The card holds a filesystem this build leaves out (the fat32 or exfat feature is off).
InvalidCluster
A cluster number in the filesystem points outside the volume: the volume is damaged.
NotFound
No file or directory at that path.
NotAFile
The path names a directory where a file was needed.
NotADirectory
The path names a file where a directory was needed (or runs through one).
InvalidName
The path or a name in it is not valid.
NameTooLong
A name is longer than 255 bytes of UTF-8 (the limit is in bytes, not characters, so that a name this crate writes can be read back).
TruncatedFile
The file’s cluster chain ends before its recorded size: the volume is damaged.
InvalidPosition
A seek past the end of the file.
NoSpace
The volume has no free cluster left (or no free directory slot, in a directory that cannot grow).
AlreadyExists
The path already names a file or directory.
NotEmpty
A directory that must be empty is not.
FileTooLarge
The file would be larger than the filesystem allows (4 GiB less one byte on FAT32).
InvalidOperation
The operation is not allowed here: a directory cannot move into itself, and a handle must belong to the filesystem it is used on.