pub struct PackGroup {
pub base_name: String,
pub pack_file: Option<PathBuf>,
pub idx_file: Option<PathBuf>,
pub rev_file: Option<PathBuf>,
pub mtimes_file: Option<PathBuf>,
}
Expand description
Represents a group of pack-related files with the same base name
Fields§
§base_name: String
§pack_file: Option<PathBuf>
§idx_file: Option<PathBuf>
§rev_file: Option<PathBuf>
§mtimes_file: Option<PathBuf>
Implementations§
Source§impl PackGroup
impl PackGroup
Sourcepub fn get_all_files(&self) -> Vec<(&str, &PathBuf)>
pub fn get_all_files(&self) -> Vec<(&str, &PathBuf)>
Returns all available file paths in this group
Sourcepub fn load_index(&self) -> Result<Option<PackIndex>, PackError>
pub fn load_index(&self) -> Result<Option<PackIndex>, PackError>
Load and parse the index file if available
Sourcepub fn lookup_object_offset(
&self,
sha1: &[u8; 20],
) -> Result<Option<u64>, PackError>
pub fn lookup_object_offset( &self, sha1: &[u8; 20], ) -> Result<Option<u64>, PackError>
Look up an object by SHA-1 hash using the index file Returns the byte offset in the pack file if found
Sourcepub fn get_stats(&self) -> Result<PackGroupStats, PackError>
pub fn get_stats(&self) -> Result<PackGroupStats, PackError>
Get basic statistics about the pack group
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PackGroup
impl RefUnwindSafe for PackGroup
impl Send for PackGroup
impl Sync for PackGroup
impl Unpin for PackGroup
impl UnwindSafe for PackGroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more