#[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()
impl StructuralPartialEq for MidxError
Auto Trait Implementations§
impl Freeze for MidxError
impl RefUnwindSafe for MidxError
impl Send for MidxError
impl Sync for MidxError
impl Unpin for MidxError
impl UnsafeUnpin for MidxError
impl UnwindSafe for MidxError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.