[−][src]Struct git_odb::pack::File
Implementations
impl File
[src]
Reading of objects
pub fn decompress_entry(
&self,
entry: &Entry,
out: &mut [u8]
) -> Result<usize, Error>
[src]
&self,
entry: &Entry,
out: &mut [u8]
) -> Result<usize, Error>
pub fn decode_entry(
&self,
entry: Entry,
out: &mut Vec<u8>,
resolve: impl Fn(&Id, &mut Vec<u8>) -> Option<ResolvedBase>,
cache: &mut impl DecodeEntry
) -> Result<DecodeEntryResult, Error>
[src]
&self,
entry: Entry,
out: &mut Vec<u8>,
resolve: impl Fn(&Id, &mut Vec<u8>) -> Option<ResolvedBase>,
cache: &mut impl DecodeEntry
) -> Result<DecodeEntryResult, Error>
Decode an entry, resolving delta's as needed, while growing the output vector if there is not enough
space to hold the result object.
Returns (object_kind, compressed_size), referring to the entry
in-pack size for use with CRC32 checks
such as in crc32(pack_data[entry.data_offset..entry.data_offset + compressed_size])
impl File
[src]
Instantiation and basic file information
pub fn kind(&self) -> Kind
[src]
pub fn num_objects(&self) -> u32
[src]
pub fn data_len(&self) -> usize
[src]
pub fn path(&self) -> &Path
[src]
pub fn checksum(&self) -> Id
[src]
pub fn verify_checksum(&self) -> Result<Id, ChecksumError>
[src]
pub fn entry_crc32(&self, pack_offset: u64, size: usize) -> u32
[src]
Currently only done during pack verification - finding the right size is only possible by decompressing the pack entry beforehand, or by using the (to be sorted) offsets stored in an index file.
pub fn entry(&self, offset: u64) -> Entry
[src]
pub fn at(path: impl AsRef<Path>) -> Result<File, Error>
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,