Skip to main content

Resolved

Struct Resolved 

Source
pub struct Resolved {
    pub oid: Vec<u8>,
    pub offset: u64,
    pub len: u64,
    pub stored_type: ObjType,
    pub kind: GitObjectKind,
    pub uncompressed_size: u64,
    pub delta_base: u64,
}
Expand description

One resolved object: exactly what the objects table stores, and no payload.

It carried an Option<Vec<u8>> payload until 2026-08-11, for a reader that stopped existing when §14’s exploded table became the fold’s input. Every production caller uses index_entry and nothing else — absorb_one builds index rows, and the one other caller discards the vector entirely and reads its sink. Content has one home now (PayloadSink, LAW 5) and this struct is the row, so a 343 MB pack’s rows cost the length of the pack’s entry list rather than the length of its history.

Fields§

§oid: Vec<u8>§offset: u64

Byte extent of the stored, verbatim entry.

§len: u64§stored_type: ObjType

The type the entry carries in the pack — which for a delta is OfsDelta / RefDelta, exactly as .idx cannot tell you and this index exists to record.

§kind: GitObjectKind

The type the chain resolves to. Always one of the four real git types.

§uncompressed_size: u64

Inflated, post-delta-resolution size — the fact .idx and .rev together still cannot answer.

§delta_base: u64

The objects.delta_base column: an archive offset, 0 for none.

Implementations§

Source§

impl Resolved

Source

pub fn index_entry(&self) -> IndexEntry

The row crate::read_stack::ObjectReadStack::append takes.

delta_base now has a column of its own in IndexEntry and rides across in it — it was carried on this struct alone until that column existed, and was deliberately never smuggled into uncompressed_size or any other field on the way. This is the only place it is written into an index row (LAW 5): resolve_walked computes it once, in the archive’s coordinate space, and nothing downstream recomputes it from the walk.

Trait Implementations§

Source§

impl Clone for Resolved

Source§

fn clone(&self) -> Resolved

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Resolved

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.