[−][src]Struct git_odb::pack::index::File
Implementations
impl File
[src]
pub fn kind(&self) -> Kind
[src]
pub fn num_objects(&self) -> u32
[src]
pub fn version(&self) -> u32
[src]
pub fn iter_v1<'a>(&'a self) -> impl Iterator<Item = Entry> + 'a
[src]
pub fn iter_v2<'a>(&'a self) -> impl Iterator<Item = Entry> + 'a
[src]
pub fn oid_at_index(&self, index: u32) -> &[u8]
[src]
Returns 20 bytes sha1 at the given index in our list of (sorted) sha1 hashes. The index ranges from 0 to self.num_objects()
pub fn pack_offset_at_index(&self, index: u32) -> u64
[src]
pub fn crc32_at_index(&self, index: u32) -> Option<u32>
[src]
pub fn lookup_index(&self, id: &[u8]) -> Option<u32>
[src]
Returns the offset of the given object ID (20 bytes) for use with the (oid|pack_offset|crc32)_at_index()
pub fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = Entry> + 'a>
[src]
pub fn at(path: impl AsRef<Path>) -> Result<File, Error>
[src]
impl File
[src]
Methods to verify and validate the content of the index file
pub fn checksum_of_index(&self) -> Id
[src]
pub fn checksum_of_pack(&self) -> Id
[src]
pub fn verify_checksum_of_index<P, C>(
&self,
pack: Option<&File>,
progress: Option<P>,
make_cache: impl Fn() -> C + Send + Sync
) -> Result<(Id, Option<PackFileChecksumResult>), ChecksumError> where
P: Progress,
<P as Progress>::SubProgress: Send,
C: DecodeEntry,
[src]
&self,
pack: Option<&File>,
progress: Option<P>,
make_cache: impl Fn() -> C + Send + Sync
) -> Result<(Id, Option<PackFileChecksumResult>), ChecksumError> where
P: Progress,
<P as Progress>::SubProgress: Send,
C: DecodeEntry,
If pack
is provided, it is expected (and validated to be) the pack belonging to this index.
It will be used to validate internal integrity of the pack before checking each objects integrity
is indeed as advertised via its SHA1 as stored in this index, as well as the CRC32 hash.
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>,