#[non_exhaustive]pub enum MidxError {
Show 21 variants
SignatureMismatch {
found: u32,
expected: u32,
},
VersionNotRecognized {
version: u8,
},
HashVersionMismatch {
found: u8,
expected: u8,
},
RequiredPackNameChunkMissing,
RequiredOidFanoutChunkMissing,
OidFanoutWrongSize,
OidFanoutOutOfOrder {
index: usize,
first: u32,
second: u32,
next: usize,
},
RequiredOidLookupChunkMissing,
OidLookupWrongSize,
RequiredObjectOffsetsChunkMissing,
ObjectOffsetsWrongSize,
PackNameChunkTooShort,
PackNamesOutOfOrder {
previous: String,
name: String,
},
LargeOffsetOutOfBounds,
InvalidChunkTable {
detail: String,
},
NoPacksToIndex,
UnknownWriteVersion {
version: i64,
},
PreferredPackEmpty {
pack: String,
},
UnknownPreferredPack {
name: String,
},
ReferencedPackMissing {
pack_index: usize,
},
BitmapWriteFailed {
detail: String,
},
}Expand description
A fatal multi-pack-index condition (Git die() after error: lines).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SignatureMismatch
Trailing or header signature does not match MIDX.
VersionNotRecognized
On-disk format version byte is not supported.
HashVersionMismatch
Header hash-version byte does not match the repository object format.
Fields
RequiredPackNameChunkMissing
Required pack-names chunk is missing or cannot be parsed.
RequiredOidFanoutChunkMissing
Required OID fanout chunk is missing.
OidFanoutWrongSize
OID fanout chunk size is not 256 × 4 bytes.
OidFanoutOutOfOrder
OID fanout table is not monotonically non-decreasing.
Fields
RequiredOidLookupChunkMissing
Required OID lookup chunk is missing.
OidLookupWrongSize
OID lookup chunk size does not match num_objects × hash_len.
RequiredObjectOffsetsChunkMissing
Required object-offsets chunk is missing.
ObjectOffsetsWrongSize
Object-offsets chunk size does not match num_objects × 8.
PackNameChunkTooShort
A pack name in the pack-names chunk is not NUL-terminated.
PackNamesOutOfOrder
v1 MIDX pack names are not strictly increasing.
Fields
LargeOffsetOutOfBounds
Large-offset chunk does not cover a referenced large offset slot.
InvalidChunkTable
Chunk table of contents could not be parsed (Git die() cases in read_table_of_contents).
NoPacksToIndex
Write attempted with no pack indexes to cover.
UnknownWriteVersion
A write requested an on-disk version other than 1 or 2 (for example through
midx.version).
PreferredPackEmpty
Preferred pack has no objects in the MIDX.
UnknownPreferredPack
Preferred pack name does not appear in the pack list.
ReferencedPackMissing
An existing MIDX names a pack whose .pack file is missing during rewrite.
BitmapWriteFailed
Reachability bitmap generation for a MIDX failed.
Trait Implementations§
impl Eq for MidxError
Source§impl Error for MidxError
impl Error for MidxError
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()