Skip to main content

DependencyResolver

Trait DependencyResolver 

Source
pub trait DependencyResolver: Send + Sync {
    // Required methods
    fn resolve_spec<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: &'life1 Config,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<DependencySpec>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn resolve_dependencies<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        specs: &'life1 [DependencySpec],
        service_details: &'life2 [ServiceDetails],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ResolvedDependency>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn check_conflicts<'life0, 'life1, 'async_trait>(
        &'life0 self,
        deps: &'life1 [ResolvedDependency],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ConflictReport>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn build_dependency_graph<'life0, 'life1, 'async_trait>(
        &'life0 self,
        deps: &'life1 [ResolvedDependency],
    ) -> Pin<Box<dyn Future<Output = Result<DependencyGraph>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

依赖解析和冲突检测

Required Methods§

Source

fn resolve_spec<'life0, 'life1, 'async_trait>( &'life0 self, config: &'life1 Config, ) -> Pin<Box<dyn Future<Output = Result<Vec<DependencySpec>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Parse dependencies from config

Source

fn resolve_dependencies<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, specs: &'life1 [DependencySpec], service_details: &'life2 [ServiceDetails], ) -> Pin<Box<dyn Future<Output = Result<Vec<ResolvedDependency>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

解析依赖并获取 proto 文件

Source

fn check_conflicts<'life0, 'life1, 'async_trait>( &'life0 self, deps: &'life1 [ResolvedDependency], ) -> Pin<Box<dyn Future<Output = Result<Vec<ConflictReport>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

检查依赖冲突

Source

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

构建依赖图

Implementors§