pub struct PackBitmapIndex {
pub version: u16,
pub format: ObjectFormat,
pub options: u16,
pub pack_checksum: ObjectId,
pub index_checksum: ObjectId,
pub type_bitmaps: PackBitmapTypeBitmaps,
pub entries: Vec<PackBitmapEntry>,
pub name_hash_cache: Option<Vec<u32>>,
}Fields§
§version: u16§format: ObjectFormat§options: u16§pack_checksum: ObjectId§index_checksum: ObjectId§type_bitmaps: PackBitmapTypeBitmaps§entries: Vec<PackBitmapEntry>§name_hash_cache: Option<Vec<u32>>Implementations§
Source§impl PackBitmapIndex
impl PackBitmapIndex
pub const OPTION_FULL_DAG: u16 = 0x0001
pub const OPTION_HASH_CACHE: u16 = 0x0004
pub fn parse( bytes: &[u8], format: ObjectFormat, object_count: usize, ) -> Result<Self>
Sourcepub fn entry_for_index_position(
&self,
position: u32,
) -> Option<&PackBitmapEntry>
pub fn entry_for_index_position( &self, position: u32, ) -> Option<&PackBitmapEntry>
Looks up the stored entry whose commit sits at position in the
oid-sorted pack index (.idx order; see PackBitmapEntry::object_position).
Source§impl PackBitmapIndex
impl PackBitmapIndex
Sourcepub fn write(&self) -> Result<Vec<u8>>
pub fn write(&self) -> Result<Vec<u8>>
Serialises this index into git’s on-disk .bitmap byte layout.
This is the exact inverse of PackBitmapIndex::parse: signature
BITM, version (u16 BE), options (u16 BE), entry count (u32 BE), the
pack checksum, the four type bitmaps (commits, trees, blobs, tags), each
commit entry (object position, XOR offset, flags, EWAH bitmap), the
optional name-hash cache, and finally the trailing index checksum over
everything written so far.
The index_checksum field of self is ignored and recomputed from the
serialised body. Returns an error for unsupported versions, mismatched
object-id formats, an oversized entry table, or an inconsistent name-hash
cache.
Trait Implementations§
Source§impl Clone for PackBitmapIndex
impl Clone for PackBitmapIndex
Source§fn clone(&self) -> PackBitmapIndex
fn clone(&self) -> PackBitmapIndex
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PackBitmapIndex
impl Debug for PackBitmapIndex
impl Eq for PackBitmapIndex
Source§impl PartialEq for PackBitmapIndex
impl PartialEq for PackBitmapIndex
Source§fn eq(&self, other: &PackBitmapIndex) -> bool
fn eq(&self, other: &PackBitmapIndex) -> bool
self and other values to be equal, and is used by ==.