#[allow(clippy::empty_docs)]
pub mod init;
mod find;
#[cfg(all(not(feature = "wasm"), feature = "streaming-input"))]
pub mod write;
#[allow(clippy::empty_docs)]
pub mod verify {
use std::sync::atomic::AtomicBool;
use gix_features::progress::DynNestedProgress;
#[allow(clippy::empty_docs)]
pub mod integrity {
pub struct Outcome {
pub actual_index_checksum: gix_hash::ObjectId,
pub pack_traverse_outcome: crate::index::traverse::Statistics,
}
}
use crate::Bundle;
impl Bundle {
pub fn verify_integrity<C, F>(
&self,
progress: &mut dyn DynNestedProgress,
should_interrupt: &AtomicBool,
options: crate::index::verify::integrity::Options<F>,
) -> Result<integrity::Outcome, crate::index::traverse::Error<crate::index::verify::integrity::Error>>
where
C: crate::cache::DecodeEntry,
F: Fn() -> C + Send + Clone,
{
self.index
.verify_integrity(
Some(crate::index::verify::PackContext {
data: &self.pack,
options,
}),
progress,
should_interrupt,
)
.map(|o| integrity::Outcome {
actual_index_checksum: o.actual_index_checksum,
pack_traverse_outcome: o.pack_traverse_statistics.expect("pack is set"),
})
}
}
}