pub trait DependencyResolver: Send + Sync {
// Required methods
fn resolve_spec<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<DependencySpec>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn resolve_dependencies<'life0, 'life1, 'async_trait>(
&'life0 self,
specs: &'life1 [DependencySpec],
) -> Pin<Box<dyn Future<Output = Result<Vec<ResolvedDependency>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: '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§
Sourcefn resolve_spec<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<DependencySpec>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_spec<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<DependencySpec>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
解析依赖规范字符串
Sourcefn resolve_dependencies<'life0, 'life1, 'async_trait>(
&'life0 self,
specs: &'life1 [DependencySpec],
) -> Pin<Box<dyn Future<Output = Result<Vec<ResolvedDependency>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_dependencies<'life0, 'life1, 'async_trait>(
&'life0 self,
specs: &'life1 [DependencySpec],
) -> Pin<Box<dyn Future<Output = Result<Vec<ResolvedDependency>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
解析多个依赖
Sourcefn 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 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,
检查依赖冲突
Sourcefn 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,
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,
构建依赖图