Skip to main content

Entry

Struct Entry 

Source
pub struct Entry<'a> { /* private fields */ }
Expand description

One checksummed/inflated entry. Delta data is an instruction stream rather than a Git object body; resolve it against an authenticated materialized base.

Implementations§

Source§

impl<'a> Entry<'a>

Source

pub fn offset(&self) -> u64

Source

pub fn end_offset(&self) -> u64

Source

pub fn compressed_offset(&self) -> u64

First byte of the zlib stream, after type/size and delta-base metadata.

Source

pub fn crc32(&self) -> u32

Source

pub fn kind(&self) -> EntryKind

Source

pub fn data(&self) -> &'a [u8]

Source

pub fn verify_crc32(&self, expected: u32) -> Result<(), Error>

Compare the entry’s wire CRC with a trusted pack-index CRC. Packs do not carry per-entry CRCs themselves; the complete pack hash is also checked.

Source

pub fn object(&self) -> Option<ResolvedObject<'a>>

Materialize metadata/ID for a non-delta entry without copying its body.

Source

pub fn resolve_delta<'out>( &self, base: &ResolvedObject<'_>, output: &'out mut [u8], limits: DeltaLimits, ) -> Result<ResolvedObject<'out>, Error>

Resolve one delta using a previously resolved entry or an external base. Offset bases must come from this pack at exactly the advertised offset; reference bases must have exactly the advertised canonical object ID. Depth is carried by resolved values, and output/instruction/depth budgets are checked before returning an object. Discard staging output on error.

Auto Trait Implementations§

§

impl<'a> Freeze for Entry<'a>

§

impl<'a> RefUnwindSafe for Entry<'a>

§

impl<'a> Send for Entry<'a>

§

impl<'a> Sync for Entry<'a>

§

impl<'a> Unpin for Entry<'a>

§

impl<'a> UnsafeUnpin for Entry<'a>

§

impl<'a> UnwindSafe for Entry<'a>

Blanket Implementations§

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<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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.