CentralityComputer

Trait CentralityComputer 

Source
pub trait CentralityComputer: Send + Sync {
    // Required methods
    fn build_dependency_graph<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        files: &'life1 [&'life2 FileInfo],
    ) -> Pin<Box<dyn Future<Output = Result<DependencyGraph>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn compute_centrality<'life0, 'life1, 'async_trait>(
        &'life0 self,
        graph: &'life1 DependencyGraph,
    ) -> Pin<Box<dyn Future<Output = Result<CentralityScores>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn supported_languages(&self) -> Vec<Language>;
    fn can_analyze_file(&self, file_info: &FileInfo) -> bool;
}
Expand description

Trait for centrality computation implementations

Required Methods§

Source

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

Build dependency graph from files

Source

fn compute_centrality<'life0, 'life1, 'async_trait>( &'life0 self, graph: &'life1 DependencyGraph, ) -> Pin<Box<dyn Future<Output = Result<CentralityScores>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Compute PageRank centrality scores

Source

fn supported_languages(&self) -> Vec<Language>

Get supported languages for dependency analysis

Source

fn can_analyze_file(&self, file_info: &FileInfo) -> bool

Check if file can be analyzed for dependencies

Implementors§