This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

1/// 2pub mod init; 3 4mod find; 5/// 6#[cfg(all(not(feature = "wasm"), feature = "streaming-input"))] 7pub mod write; 8 9/// 10pub mod verify { 11 use std::sync::atomic::AtomicBool; 12 13 use gix_features::progress::DynNestedProgress; 14 15 /// 16 pub mod integrity { 17 /// Returned by [`Bundle::verify_integrity()`][crate::Bundle::verify_integrity()]. 18 pub struct Outcome { 19 /// The computed checksum of the index which matched the stored one. 20 pub actual_index_checksum: gix_hash::ObjectId, 21 /// The packs traversal outcome 22 pub pack_traverse_outcome: crate::index::traverse::Statistics, 23 } 24 } 25 26 use crate::Bundle; 27 28 impl Bundle { 29 /// Similar to [`crate::index::File::verify_integrity()`] but more convenient to call as the presence of the 30 /// pack file is a given. 31 pub fn verify_integrity<C, F>( 32 &self, 33 progress: &mut dyn DynNestedProgress, 34 should_interrupt: &AtomicBool, 35 options: crate::index::verify::integrity::Options<F>, 36 ) -> Result< 37 integrity::Outcome, 38 crate::index::traverse::Error<crate::index::verify::integrity::Error>, 39 > 40 where 41 C: crate::cache::DecodeEntry, 42 F: Fn() -> C + Send + Clone, 43 { 44 self.index 45 .verify_integrity( 46 Some(crate::index::verify::PackContext { 47 data: &self.pack, 48 options, 49 }), 50 progress, 51 should_interrupt, 52 ) 53 .map(|o| integrity::Outcome { 54 actual_index_checksum: o.actual_index_checksum, 55 pack_traverse_outcome: o.pack_traverse_statistics.expect("pack is set"), 56 }) 57 } 58 } 59}