pub struct GitPlumber { /* private fields */ }
Expand description
Main application struct that handles shared logic
Implementations§
Source§impl GitPlumber
impl GitPlumber
Sourcepub fn get_repo_path(&self) -> &Path
pub fn get_repo_path(&self) -> &Path
Get the repository path
Sourcepub const fn get_repository(&self) -> Option<&Repository>
pub const fn get_repository(&self) -> Option<&Repository>
Get access to the repository if it exists
Sourcepub fn list_pack_files(&self) -> Result<Vec<PathBuf>, RepositoryError>
pub fn list_pack_files(&self) -> Result<Vec<PathBuf>, RepositoryError>
List all pack files in the repository
§Errors
This function will return an error if:
- The path is not a valid git repository
- File system operations fail when reading the objects/pack directory
Sourcepub fn list_pack_groups(
&self,
) -> Result<HashMap<String, PackGroup>, RepositoryError>
pub fn list_pack_groups( &self, ) -> Result<HashMap<String, PackGroup>, RepositoryError>
List all pack-related files grouped by their base name
§Errors
This function will return an error if:
- The path is not a valid git repository
- File system operations fail when reading the objects/pack directory
Sourcepub fn list_head_refs(&self) -> Result<Vec<PathBuf>, RepositoryError>
pub fn list_head_refs(&self) -> Result<Vec<PathBuf>, RepositoryError>
List all head refs (local branches) in the repository
§Errors
This function will return an error if:
- The path is not a valid git repository
- File system operations fail when reading the refs/heads directory
Sourcepub fn list_remote_refs(
&self,
) -> Result<Vec<(String, Vec<PathBuf>)>, RepositoryError>
pub fn list_remote_refs( &self, ) -> Result<Vec<(String, Vec<PathBuf>)>, RepositoryError>
List all remote refs in the repository
§Errors
This function will return an error if:
- The path is not a valid git repository
- File system operations fail when reading the refs/remotes directory
Sourcepub fn list_tag_refs(&self) -> Result<Vec<PathBuf>, RepositoryError>
pub fn list_tag_refs(&self) -> Result<Vec<PathBuf>, RepositoryError>
List all tag refs in the repository
§Errors
This function will return an error if:
- The path is not a valid git repository
- File system operations fail when reading the refs/tags directory
Sourcepub fn has_stash_ref(&self) -> Result<bool, RepositoryError>
pub fn has_stash_ref(&self) -> Result<bool, RepositoryError>
Check if the repository has stash refs
§Errors
This function will return an error if:
- The path is not a valid git repository
- File system operations fail when checking for stash refs
Sourcepub fn list_loose_objects(
&self,
limit: usize,
) -> Result<Vec<PathBuf>, RepositoryError>
pub fn list_loose_objects( &self, limit: usize, ) -> Result<Vec<PathBuf>, RepositoryError>
List loose objects in the repository with a limit
§Errors
This function will return an error if:
- The path is not a valid git repository
- File system operations fail when reading loose object directories
Sourcepub fn list_parsed_loose_objects(
&self,
limit: usize,
) -> Result<Vec<LooseObject>, RepositoryError>
pub fn list_parsed_loose_objects( &self, limit: usize, ) -> Result<Vec<LooseObject>, RepositoryError>
List parsed loose objects in the repository with a limit
§Errors
This function will return an error if:
- The path is not a valid git repository
- File system operations fail when reading loose object directories
- Loose objects cannot be parsed or decompressed
Sourcepub fn get_loose_object_stats(
&self,
) -> Result<LooseObjectStats, RepositoryError>
pub fn get_loose_object_stats( &self, ) -> Result<LooseObjectStats, RepositoryError>
Get statistics about loose objects in the repository
§Errors
This function will return an error if:
- The path is not a valid git repository
- File system operations fail when reading loose object directories
- Loose objects cannot be parsed or analyzed
Sourcepub fn parse_pack_file(&self, path: &Path) -> Result<(), String>
pub fn parse_pack_file(&self, path: &Path) -> Result<(), String>
Parse a pack file (basic analysis)
§Errors
This function will return an error if:
- The pack file cannot be read
- The pack file format is invalid
- Parsing operations fail
Sourcepub fn parse_pack_file_rich(&self, path: &Path) -> Result<(), String>
pub fn parse_pack_file_rich(&self, path: &Path) -> Result<(), String>
Parse a pack file with detailed formatting for display
§Errors
This function will return an error if:
- The pack file cannot be read
- The pack file format is invalid
- Parsing or display formatting operations fail
Auto Trait Implementations§
impl Freeze for GitPlumber
impl RefUnwindSafe for GitPlumber
impl Send for GitPlumber
impl Sync for GitPlumber
impl Unpin for GitPlumber
impl UnwindSafe for GitPlumber
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
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>
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>
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