Skip to content
Clone
41234aa
17 lines 648 B Rust
//! gc Operation method trait for the module.
use crate::gc::types::{FsckResult, GcResult, PackStats, RepoStats};
/// Operation trait for repository maintenance.
pub trait GcOps {
/// Collect repository statistics.
fn gc_stats(&self) -> Result<RepoStats, crate::Error>;
/// Run garbage collection.
fn gc_gc(&self) -> Result<GcResult, crate::Error>;
/// Verify object integrity.
fn gc_fsck(&self) -> Result<FsckResult, crate::Error>;
/// Object count.
fn gc_count_objects(&self) -> Result<PackStats, crate::Error>;
/// Prune dangling objects.
fn gc_prune_orphans(&self) -> Result<GcResult, crate::Error>;
}