RepositoryAnalyzer

Trait RepositoryAnalyzer 

Source
pub trait RepositoryAnalyzer: Send + Sync {
    // Required methods
    fn analyze_repository<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        root_path: &'life1 Path,
        config: &'life2 Config,
    ) -> Pin<Box<dyn Future<Output = Result<RepositoryInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn get_statistics<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        root_path: &'life1 Path,
        files: &'life2 [FileInfo],
    ) -> Pin<Box<dyn Future<Output = Result<RepositoryInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn can_analyze(&self, root_path: &Path) -> bool;

    // Provided method
    fn priority(&self) -> u8 { ... }
}
Expand description

Trait for repository analysis implementations

Required Methods§

Source

fn analyze_repository<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, root_path: &'life1 Path, config: &'life2 Config, ) -> Pin<Box<dyn Future<Output = Result<RepositoryInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Analyze repository structure and metadata

Source

fn get_statistics<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, root_path: &'life1 Path, files: &'life2 [FileInfo], ) -> Pin<Box<dyn Future<Output = Result<RepositoryInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get repository statistics

Source

fn can_analyze(&self, root_path: &Path) -> bool

Check if this analyzer can handle the given repository

Provided Methods§

Source

fn priority(&self) -> u8

Get analyzer priority (higher = preferred)

Implementors§