Struct git_pack::data::output::Entry [−][src]
pub struct Entry {
pub id: ObjectId,
pub kind: Kind,
pub decompressed_size: usize,
pub compressed_data: Vec<u8>,
}Expand description
An entry to be written to a file.
Some of these will be in-flight and in memory while waiting to be written. Memory requirements depend on the amount of compressed data they hold.
Fields
id: ObjectIdThe hash of the object to write
kind: KindThe kind of entry represented by data. It’s used alongside with it to complete the pack entry
at rest or in transit.
decompressed_size: usizeThe size in bytes needed once data gets decompressed
compressed_data: Vec<u8>The compressed data right behind the header
Implementations
An object which can be identified as invalid easily which happens if objects didn’t exist even if they were referred to.
Returns true if this object doesn’t really exist but still has to be handled responsibly
Create an Entry from a previously counted object which is located in a pack. It’s entry is provided here.
The version specifies what kind of target Entry version the caller desires.
Create a new instance from the given oid and its corresponding git object data.
Transform ourselves into pack entry header of version which can be written into a pack.
index_to_pack(object_index) -> pack_offset is a function to convert the base object’s index into
the input object array (if each object is numbered) to an offset into the pack.
This information is known to the one calling the method.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Entry
impl UnwindSafe for Entry
Blanket Implementations
Mutably borrows from an owned value. Read more