199a892
//! pack Operation method trait for the module.
use crate::pack::types::{HotPackResult, IndexResult, IngestPackResult, PackStats, RepackResult};
/// pack Operation trait.
pub trait PackOps {
/// Receive and parse a pack stream.
fn pack_ingest_pack(&self, data: &[u8]) -> Result<IngestPackResult, crate::Error>;
/// Build a pack index.
fn pack_index(&self, pack_id: &str) -> Result<IndexResult, crate::Error>;
/// Repack the repository.
fn pack_repack(&self) -> Result<RepackResult, crate::Error>;
/// pack Statistics.
fn pack_stats(&self) -> Result<PackStats, crate::Error>;
/// Maintain a hot pack cache.
fn pack_cache_hot_pack(&self, pack_id: &str) -> Result<HotPackResult, crate::Error>;
}