pub enum Error {
Show 19 variants
Io(Error),
InvalidMbrSignature {
found: [u8; 2],
},
InvalidGptSignature {
found: [u8; 8],
},
GptHeaderCrcMismatch {
expected: u32,
actual: u32,
},
GptEntriesCrcMismatch {
expected: u32,
actual: u32,
},
BackupHeaderIo {
lba: u64,
source: Error,
},
InvalidBackupGptSignature {
found: [u8; 8],
},
BackupGptHeaderCrcMismatch {
expected: u32,
actual: u32,
},
PartitionOverlap {
index1: usize,
index2: usize,
overlap_start: u64,
overlap_end: u64,
},
TooManyPartitions {
max: usize,
requested: usize,
},
PartitionOutOfBounds {
index: usize,
partition_end: u64,
disk_end: u64,
},
InvalidPartitionEntrySize {
size: u32,
},
InvalidBlockSize {
size: u32,
minimum: u32,
},
BackupHeaderMismatch,
NoProtectiveMbr,
InvalidHybridMbr {
reason: &'static str,
},
DiskTooSmall {
required: u64,
available: u64,
},
FeatureNotAvailable(&'static str),
MisalignedPartition {
lba: u64,
required_alignment: u64,
},
}Expand description
Errors that can occur during partition table operations.
Variants§
Io(Error)
An I/O error occurred.
InvalidMbrSignature
The MBR signature (0x55AA) is invalid.
InvalidGptSignature
The GPT signature (“EFI PART”) is invalid.
GptHeaderCrcMismatch
The GPT header CRC32 checksum does not match.
Fields
GptEntriesCrcMismatch
The GPT partition entry array CRC32 checksum does not match.
Fields
BackupHeaderIo
The backup GPT header could not be read from its declared LBA.
Fields
InvalidBackupGptSignature
The backup GPT header signature is invalid.
BackupGptHeaderCrcMismatch
The backup GPT header CRC32 checksum does not match.
Fields
PartitionOverlap
Two partitions overlap.
Fields
TooManyPartitions
Too many partitions requested.
Fields
PartitionOutOfBounds
A partition extends beyond the disk boundary.
Fields
InvalidPartitionEntrySize
The partition entry size is invalid.
InvalidBlockSize
A logical block is too small to contain the requested structure.
BackupHeaderMismatch
The backup GPT header does not match the primary.
NoProtectiveMbr
No protective MBR found on a GPT disk.
InvalidHybridMbr
Invalid hybrid MBR configuration.
DiskTooSmall
The disk is too small for the requested partitions.
FeatureNotAvailable(&'static str)
A required feature is not available.
MisalignedPartition
A partition is not properly aligned.
Trait Implementations§
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
std only.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()