Struct git_odb::pack::data::Entry[][src]

pub struct Entry {
    pub header: Header,
    pub decompressed_size: u64,
    pub data_offset: u64,
}

An representing an full- or delta-object within a pack

Fields

header: Header

The entry’s header

decompressed_size: u64

The decompressed size of the object in bytes

data_offset: u64

absolute offset to compressed object data in the pack, just behind the entry’s header

Implementations

impl Entry[src]

Decoding

pub fn from_bytes(d: &[u8], pack_offset: u64) -> Entry[src]

Decode an entry from the given entry data d, providing the pack_offset to allow tracking the start of the entry data section.

Panics

If we cannot understand the header, garbage data is likely to trigger this.

pub fn from_read(r: impl Read, pack_offset: u64) -> Result<Entry, Error>[src]

Instantiate an Entry from the reader r, providing the pack_offset to allow tracking the start of the entry data section.

impl Entry[src]

Access

pub fn base_pack_offset(&self, distance: u64) -> u64[src]

Compute the pack offset to the base entry of the object represented by this entry.

pub fn pack_offset(&self) -> u64[src]

The pack offset at which this entry starts

pub fn header_size(&self) -> usize[src]

The amount of bytes used to describe this entry in the pack. The header starts at Self::pack_offset()

Trait Implementations

impl Clone for Entry[src]

impl Debug for Entry[src]

impl<'de> Deserialize<'de> for Entry[src]

impl Eq for Entry[src]

impl Hash for Entry[src]

impl Ord for Entry[src]

impl PartialEq<Entry> for Entry[src]

impl PartialOrd<Entry> for Entry[src]

impl Serialize for Entry[src]

impl StructuralEq for Entry[src]

impl StructuralPartialEq for Entry[src]

Auto Trait Implementations

impl RefUnwindSafe for Entry

impl Send for Entry

impl Sync for Entry

impl Unpin for Entry

impl UnwindSafe for Entry

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CallHasher for T where
    T: Hash

impl<T> Conv for T

impl<T> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,