pub struct RepositoryAnalyzer { /* private fields */ }Expand description
Repository Analyzer
Analyzes GitHub repositories for context, including:
- Repository metadata and structure
- Project dependencies and versions
- Code patterns and conventions
- Codebase summaries
- Analysis result caching with TTL
- Incremental updates
Implementations§
Source§impl RepositoryAnalyzer
impl RepositoryAnalyzer
Sourcepub fn with_ttl(ttl_seconds: u64) -> Self
pub fn with_ttl(ttl_seconds: u64) -> Self
Create a new RepositoryAnalyzer with custom TTL
§Arguments
ttl_seconds- Cache TTL in seconds (0 = no expiration)
Sourcepub async fn fetch_repository_metadata(
&self,
owner: &str,
repo: &str,
) -> Result<Repository>
pub async fn fetch_repository_metadata( &self, owner: &str, repo: &str, ) -> Result<Repository>
Sourcepub async fn identify_dependencies(
&self,
owner: &str,
repo: &str,
) -> Result<Vec<Dependency>>
pub async fn identify_dependencies( &self, owner: &str, repo: &str, ) -> Result<Vec<Dependency>>
Sourcepub async fn extract_code_patterns(
&self,
owner: &str,
repo: &str,
) -> Result<Vec<CodePattern>>
pub async fn extract_code_patterns( &self, owner: &str, repo: &str, ) -> Result<Vec<CodePattern>>
Sourcepub async fn generate_codebase_summary(
&self,
owner: &str,
repo: &str,
) -> Result<CodebaseSummary>
pub async fn generate_codebase_summary( &self, owner: &str, repo: &str, ) -> Result<CodebaseSummary>
Sourcepub async fn analyze_repository(
&mut self,
owner: &str,
repo: &str,
) -> Result<RepositoryAnalysis>
pub async fn analyze_repository( &mut self, owner: &str, repo: &str, ) -> Result<RepositoryAnalysis>
Sourcepub async fn update_repository_analysis(
&mut self,
owner: &str,
repo: &str,
) -> Result<RepositoryAnalysis>
pub async fn update_repository_analysis( &mut self, owner: &str, repo: &str, ) -> Result<RepositoryAnalysis>
Sourcepub fn get_cached_analysis(
&self,
owner: &str,
repo: &str,
) -> Option<RepositoryAnalysis>
pub fn get_cached_analysis( &self, owner: &str, repo: &str, ) -> Option<RepositoryAnalysis>
Sourcepub fn cache_stats(&self) -> (usize, usize, usize)
pub fn cache_stats(&self) -> (usize, usize, usize)
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear all cache entries
Sourcepub fn clear_cache_entry(&mut self, owner: &str, repo: &str)
pub fn clear_cache_entry(&mut self, owner: &str, repo: &str)
Sourcepub fn cleanup_expired_entries(&mut self)
pub fn cleanup_expired_entries(&mut self)
Remove expired cache entries
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RepositoryAnalyzer
impl RefUnwindSafe for RepositoryAnalyzer
impl Send for RepositoryAnalyzer
impl Sync for RepositoryAnalyzer
impl Unpin for RepositoryAnalyzer
impl UnwindSafe for RepositoryAnalyzer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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