pub struct IndexEntry {
pub oid: Vec<u8>,
pub offset: u64,
pub len: u64,
pub obj_type: ObjType,
pub uncompressed_size: u64,
pub delta_base: u64,
}Expand description
One object, as the caller hands it to ObjectIndex::build. Order is
irrelevant — every implementation sorts by oid and derives ordinals itself.
Fields§
§oid: Vec<u8>20 bytes (sha1) or 32 (sha256). All entries in one index must agree.
offset: u64Start of the object’s bytes within the archive.
len: u64Length of those bytes as stored (compressed / delta-encoded).
obj_type: ObjType§uncompressed_size: u64Inflated, post-delta-resolution size. The fact .idx and .rev
together still cannot answer.
delta_base: u64objects.delta_base — the archive offset of the entry this one
deltas against, 0 for none (PLAN §13).
An offset and not an ordinal, on purpose: it is in the same coordinate
space as offset, so it survives a rebuild of this table
in any order and a rebase of the pack is one addition
(crate::pack_walk::PackWalk::rebased). 0 cannot collide with a real
base because archive offset 0 is a pack’s PACK magic. A REF_DELTA
records 0 until its oid is resolved to an offset —
obj_type is what distinguishes that from no base.
Trait Implementations§
Source§impl Clone for IndexEntry
impl Clone for IndexEntry
Source§fn clone(&self) -> IndexEntry
fn clone(&self) -> IndexEntry
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 IndexEntry
impl Debug for IndexEntry
impl Eq for IndexEntry
Source§impl PartialEq for IndexEntry
impl PartialEq for IndexEntry
impl StructuralPartialEq for IndexEntry
Auto Trait Implementations§
impl Freeze for IndexEntry
impl RefUnwindSafe for IndexEntry
impl Send for IndexEntry
impl Sync for IndexEntry
impl Unpin for IndexEntry
impl UnsafeUnpin for IndexEntry
impl UnwindSafe for IndexEntry
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.